From 489ef435fb31467b66d05368fbd860ef7c66f98a Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 19 Feb 2024 19:42:32 +0100 Subject: [PATCH] fix lint errs --- internal/ethapi/api_test.go | 4 ++-- internal/ethapi/simulate.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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.