Skip to content

Commit

Permalink
update eth_gasPrice endpoint to use min gas price when NoBaseFee set …
Browse files Browse the repository at this point in the history
…to (#7)

true
  • Loading branch information
nddeluca authored May 6, 2022
1 parent a26fae4 commit 02e1b41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/ethereum/namespaces/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (e *PublicAPI) GasPrice() (*hexutil.Big, error) {
result *big.Int
err error
)
if head := e.backend.CurrentHeader(); head.BaseFee != nil {
if head := e.backend.CurrentHeader(); head.BaseFee != nil && head.BaseFee.BitLen() > 0 {
result, err = e.backend.SuggestGasTipCap(head.BaseFee)
if err != nil {
return nil, err
Expand Down

0 comments on commit 02e1b41

Please sign in to comment.