aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-01-07 01:30:44 +0800
committerGitHub <noreply@github.com>2017-01-07 01:30:44 +0800
commitac93a6ff6cd1200ab0fb67a5bd0c02cb70646632 (patch)
tree2b06aa1b360f1488264058d04e399e84b898f0d8 /eth/handler_test.go
parent444fc892b0a860218dab3e421d92c33408b9eb6d (diff)
parent13e3b2f433c48fe81423c1a13e9a5194ece61b01 (diff)
downloaddexon-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar
dexon-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.gz
dexon-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.bz2
dexon-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.lz
dexon-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.xz
dexon-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.zst
dexon-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.zip
Merge pull request #3525 from fjl/all-gosimple-cleanup
all: clean up lint issues, remove more dead code
Diffstat (limited to 'eth/handler_test.go')
-rw-r--r--eth/handler_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/eth/handler_test.go b/eth/handler_test.go
index 6900f7808..4695b3f60 100644
--- a/eth/handler_test.go
+++ b/eth/handler_test.go
@@ -75,7 +75,7 @@ func testGetBlockHeaders(t *testing.T, protocol int) {
// Create a "random" unknown hash for testing
var unknown common.Hash
- for i, _ := range unknown {
+ for i := range unknown {
unknown[i] = byte(i)
}
// Create a batch of tests for various scenarios
@@ -246,17 +246,17 @@ func testGetBlockBodies(t *testing.T, protocol int) {
{limit + 1, nil, nil, limit}, // No more than the possible block count should be returned
{0, []common.Hash{pm.blockchain.Genesis().Hash()}, []bool{true}, 1}, // The genesis block should be retrievable
{0, []common.Hash{pm.blockchain.CurrentBlock().Hash()}, []bool{true}, 1}, // The chains head block should be retrievable
- {0, []common.Hash{common.Hash{}}, []bool{false}, 0}, // A non existent block should not be returned
+ {0, []common.Hash{{}}, []bool{false}, 0}, // A non existent block should not be returned
// Existing and non-existing blocks interleaved should not cause problems
{0, []common.Hash{
- common.Hash{},
+ {},
pm.blockchain.GetBlockByNumber(1).Hash(),
- common.Hash{},
+ {},
pm.blockchain.GetBlockByNumber(10).Hash(),
- common.Hash{},
+ {},
pm.blockchain.GetBlockByNumber(100).Hash(),
- common.Hash{},
+ {},
}, []bool{false, true, false, true, false, true, false}, 3},
}
// Run each of the tests and verify the results against the chain