diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index ecfb189fea..b89f4d989d 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -1024,7 +1024,7 @@ func TestSimulateV1(t *testing.T) { coinbase = "0x000000000000000000000000000000000000ffff" genesis = &core.Genesis{ Config: params.TestChainConfig, - Alloc: core.GenesisAlloc{ + Alloc: types.GenesisAlloc{ accounts[0].addr: {Balance: big.NewInt(params.Ether)}, accounts[1].addr: {Balance: big.NewInt(params.Ether)}, accounts[2].addr: {Balance: big.NewInt(params.Ether)}, @@ -1354,7 +1354,7 @@ func TestSimulateV1(t *testing.T) { }}, }}, want: []blockRes{}, - expectErr: &invalidBlockNumberError{message: fmt.Sprintf("block numbers must be in order: 11 <= 12")}, + expectErr: &invalidBlockNumberError{message: "block numbers must be in order: 11 <= 12"}, }, // Test on solidity storage example. Set value in one call, read in next. { diff --git a/internal/ethapi/simulate.go b/internal/ethapi/simulate.go index 2043965b12..388236eb32 100644 --- a/internal/ethapi/simulate.go +++ b/internal/ethapi/simulate.go @@ -330,7 +330,7 @@ func (sim *simulator) computeBlockHash(ctx context.Context, n uint64, base *type return h.Hash(), nil } h := base - for i, _ := range headers { + for i := range headers { tmp := headers[i] // BLOCKHASH will only allow numbers prior to current block // so no need to check that condition.