all: remove redundant conversions and import names (#21903)

This commit is contained in:
Alex Prut
2020-11-25 21:00:23 +01:00
committed by GitHub
parent f59ed3565d
commit 810f9e057d
44 changed files with 66 additions and 67 deletions

View File

@ -19,7 +19,6 @@ package miner
import (
"testing"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
)
@ -43,7 +42,7 @@ func TestUnconfirmedInsertBounds(t *testing.T) {
for depth := uint64(0); depth < 2*uint64(limit); depth++ {
// Insert multiple blocks for the same level just to stress it
for i := 0; i < int(depth); i++ {
pool.Insert(depth, common.Hash([32]byte{byte(depth), byte(i)}))
pool.Insert(depth, [32]byte{byte(depth), byte(i)})
}
// Validate that no blocks below the depth allowance are left in
pool.blocks.Do(func(block interface{}) {
@ -63,7 +62,7 @@ func TestUnconfirmedShifts(t *testing.T) {
pool := newUnconfirmedBlocks(new(noopChainRetriever), limit)
for depth := start; depth < start+uint64(limit); depth++ {
pool.Insert(depth, common.Hash([32]byte{byte(depth)}))
pool.Insert(depth, [32]byte{byte(depth)})
}
// Try to shift below the limit and ensure no blocks are dropped
pool.Shift(start + uint64(limit) - 1)