Skip to content

Commit

Permalink
internal/ethapi: changed 'gasPrice' data type to BigInt ('GetTransact…
Browse files Browse the repository at this point in the history
…ionReceipt' RPC API).
  • Loading branch information
cp-jhjin committed Apr 3, 2023
1 parent 37d918e commit 39534ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1667,14 +1667,14 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
}
// Assign the effective gas price paid
if !s.b.ChainConfig().IsLondon(bigblock) {
fields["effectiveGasPrice"] = hexutil.Uint64(tx.GasPrice().Uint64())
fields["effectiveGasPrice"] = tx.GasPrice()
} else {
header, err := s.b.HeaderByHash(ctx, blockHash)
if err != nil {
return nil, err
}
gasPrice := new(big.Int).Add(header.BaseFee, tx.EffectiveGasTipValue(header.BaseFee))
fields["effectiveGasPrice"] = hexutil.Uint64(gasPrice.Uint64())
fields["effectiveGasPrice"] = gasPrice
}
// Assign receipt status or post state.
if len(receipt.PostState) > 0 {
Expand Down

0 comments on commit 39534ad

Please sign in to comment.