Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rachit77 committed Sep 6, 2023
1 parent ddf6c79 commit 7e12f27
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions jsonrpc/eth_blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 7e12f27

Please sign in to comment.