From 7e12f2704ccf2db4a986598253f7057a12159b04 Mon Sep 17 00:00:00 2001 From: Rachit Sonthalia Date: Thu, 7 Sep 2023 00:25:32 +0530 Subject: [PATCH] fix test --- jsonrpc/eth_blockchain_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/jsonrpc/eth_blockchain_test.go b/jsonrpc/eth_blockchain_test.go index d815b6e62f..048996d431 100644 --- a/jsonrpc/eth_blockchain_test.go +++ b/jsonrpc/eth_blockchain_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/0xPolygon/polygon-edge/blockchain" + "github.com/0xPolygon/polygon-edge/chain" "github.com/0xPolygon/polygon-edge/helper/hex" "github.com/0xPolygon/polygon-edge/helper/progress" "github.com/0xPolygon/polygon-edge/state/runtime" @@ -280,6 +281,11 @@ func TestEth_Syncing(t *testing.T) { func TestEth_GetPrice_PriceLimitSet(t *testing.T) { priceLimit := uint64(100333) store := newMockBlockStore() + store.blocks = []*types.Block{ + { + Header: &types.Header{Number: uint64(1)}, + }, + } // not using newTestEthEndpoint as we need to set priceLimit eth := newTestEthEndpointWithPriceLimit(store, priceLimit) @@ -598,6 +604,14 @@ func (m *mockBlockStore) GetAccount(root types.Hash, addr types.Address) (*Accou return &Account{Nonce: 0}, nil } +func (m *mockBlockStore) GetBaseFee() uint64 { + return 0 +} + +func (m *mockBlockStore) GetForksInTime(block uint64) chain.ForksInTime { + return chain.ForksInTime{London: false} +} + func newTestBlock(number uint64, hash types.Hash) *types.Block { return &types.Block{ Header: &types.Header{