diff --git a/ethapi/api.go b/ethapi/api.go index 1ec07bfa6..bff5abac8 100644 --- a/ethapi/api.go +++ b/ethapi/api.go @@ -1623,13 +1623,9 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha "type": hexutil.Uint(tx.Type()), } // Assign the effective gas price paid - if !s.b.ChainConfig().IsLondon(bigblock) { + if header.BaseFee == nil { fields["effectiveGasPrice"] = hexutil.Uint64(tx.GasPrice().Uint64()) } else { - header, err := s.b.HeaderByHash(ctx, header.Hash) - if err != nil { - return nil, err - } gasPrice := new(big.Int).Add(header.BaseFee, tx.EffectiveGasTipValue(header.BaseFee)) fields["effectiveGasPrice"] = hexutil.Uint64(gasPrice.Uint64()) }