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

Commit

Permalink
fix rpc methdod
Browse files Browse the repository at this point in the history
  • Loading branch information
rachit77 committed Sep 6, 2023
1 parent b467a12 commit ddf6c79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions jsonrpc/eth_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ type ethTxPoolStore interface {

// GetNonce returns the next nonce for this address
GetNonce(addr types.Address) uint64

// returns the current base fee of TxPool
GetBaseFee() uint64
}

type Account struct {
Expand Down Expand Up @@ -397,6 +400,10 @@ func (e *Eth) GasPrice() (interface{}, error) {
avgGasPrice := e.store.GetAvgGasPrice().Uint64()

// Return --price-limit flag defined value if it is greater than avgGasPrice
if e.store.GetForksInTime(e.store.Header().Number).London {
return argUint64(common.Max(e.priceLimit, common.Max(avgGasPrice, e.store.GetBaseFee()))), nil
}

return argUint64(common.Max(e.priceLimit, avgGasPrice)), nil
}

Expand Down

0 comments on commit ddf6c79

Please sign in to comment.