Skip to content

Commit

Permalink
Fix effective gas price calculation
Browse files Browse the repository at this point in the history
6351612 introduced the bug by
accidentally losing the negation in `if
!s.b.ChainConfig().IsLondon(bigblock)`. This results in wrong
`effectiveGasPrice` values to be returned from the RPC. The actually
transferred fees are correct.
  • Loading branch information
karlb committed Apr 24, 2024
1 parent 12cda24 commit c204e44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,7 @@ func generateReceiptResponse(ctx context.Context, backend Backend, receipt *type
fields["from"], _ = types.Sender(signer, tx)
fields["to"] = tx.To()
// Assign the effective gas price paid
if backend.ChainConfig().IsLondon(new(big.Int).SetUint64(blockNumber)) {
if !backend.ChainConfig().IsLondon(new(big.Int).SetUint64(blockNumber)) {
fields["effectiveGasPrice"] = hexutil.Uint64(tx.GasPrice().Uint64())
} else {
// var gasPrice *big.Int = new(big.Int)
Expand Down

0 comments on commit c204e44

Please sign in to comment.