diff options
author | Felix Lange <fjl@twurst.com> | 2017-01-06 22:52:03 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-01-06 22:52:03 +0800 |
commit | 35a7dcb162546f7f31cb6492f716cb93159218d7 (patch) | |
tree | 4828026948031719a703a87e0ce909e82da21d3b /les/handler_test.go | |
parent | e0fde022909d272e55fb9ea2d4f8cfe9f178dba8 (diff) | |
download | go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.gz go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.bz2 go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.lz go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.xz go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.zst go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.zip |
all: gofmt -w -s
Diffstat (limited to 'les/handler_test.go')
-rw-r--r-- | les/handler_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/les/handler_test.go b/les/handler_test.go index 37c5dd226..0b94d0d30 100644 --- a/les/handler_test.go +++ b/les/handler_test.go @@ -49,7 +49,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 @@ -189,17 +189,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{bc.Genesis().Hash()}, []bool{true}, 1}, // The genesis block should be retrievable {0, []common.Hash{bc.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{}, + {}, bc.GetBlockByNumber(1).Hash(), - common.Hash{}, + {}, bc.GetBlockByNumber(10).Hash(), - common.Hash{}, + {}, bc.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 @@ -312,7 +312,7 @@ func testGetProofs(t *testing.T, protocol int) { var proofreqs []ProofReq var proofs [][]rlp.RawValue - accounts := []common.Address{testBankAddress, acc1Addr, acc2Addr, common.Address{}} + accounts := []common.Address{testBankAddress, acc1Addr, acc2Addr, {}} for i := uint64(0); i <= bc.CurrentBlock().NumberU64(); i++ { header := bc.GetHeaderByNumber(i) root := header.Root |