|
|
@ -10,7 +10,7 @@ import ( |
|
|
|
// Simple test for IncorrectResponse
|
|
|
|
// Simple test for IncorrectResponse
|
|
|
|
func TestCreateTestSyncPeerConfig(t *testing.T) { |
|
|
|
func TestCreateTestSyncPeerConfig(t *testing.T) { |
|
|
|
client := &downloader.Client{} |
|
|
|
client := &downloader.Client{} |
|
|
|
blockHashes := [][]byte{[]byte{}} |
|
|
|
blockHashes := [][]byte{{}} |
|
|
|
syncPeerConfig := CreateTestSyncPeerConfig(client, blockHashes) |
|
|
|
syncPeerConfig := CreateTestSyncPeerConfig(client, blockHashes) |
|
|
|
assert.Equal(t, client, syncPeerConfig.GetClient(), "error") |
|
|
|
assert.Equal(t, client, syncPeerConfig.GetClient(), "error") |
|
|
|
} |
|
|
|
} |
|
|
@ -18,9 +18,9 @@ func TestCreateTestSyncPeerConfig(t *testing.T) { |
|
|
|
// Simple test for IncorrectResponse
|
|
|
|
// Simple test for IncorrectResponse
|
|
|
|
func TestCompareSyncPeerConfigByblockHashes(t *testing.T) { |
|
|
|
func TestCompareSyncPeerConfigByblockHashes(t *testing.T) { |
|
|
|
client := &downloader.Client{} |
|
|
|
client := &downloader.Client{} |
|
|
|
blockHashes1 := [][]byte{[]byte{1, 2, 3}} |
|
|
|
blockHashes1 := [][]byte{{1, 2, 3}} |
|
|
|
syncPeerConfig1 := CreateTestSyncPeerConfig(client, blockHashes1) |
|
|
|
syncPeerConfig1 := CreateTestSyncPeerConfig(client, blockHashes1) |
|
|
|
blockHashes2 := [][]byte{[]byte{1, 2, 4}} |
|
|
|
blockHashes2 := [][]byte{{1, 2, 4}} |
|
|
|
syncPeerConfig2 := CreateTestSyncPeerConfig(client, blockHashes2) |
|
|
|
syncPeerConfig2 := CreateTestSyncPeerConfig(client, blockHashes2) |
|
|
|
|
|
|
|
|
|
|
|
// syncPeerConfig1 is less than syncPeerConfig2
|
|
|
|
// syncPeerConfig1 is less than syncPeerConfig2
|
|
|
|