all: gofmt -w -s

This commit is contained in:
Felix Lange
2017-01-06 15:52:03 +01:00
parent e0fde02290
commit 35a7dcb162
64 changed files with 343 additions and 343 deletions

View File

@ -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