mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
internal/ethapi: default effectiveGasPrice when nil
This commit is contained in:
parent
19826950a8
commit
fca0d89227
1 changed files with 4 additions and 0 deletions
|
|
@ -2105,6 +2105,10 @@ func (s *TransactionAPI) GetTransactionReceipt(ctx context.Context, hash common.
|
|||
"effectiveGasPrice": (*hexutil.Big)(receipt.EffectiveGasPrice),
|
||||
}
|
||||
|
||||
if receipt.EffectiveGasPrice == nil {
|
||||
fields["effectiveGasPrice"] = new(hexutil.Big)
|
||||
}
|
||||
|
||||
// Assign receipt status or post state.
|
||||
if len(receipt.PostState) > 0 {
|
||||
fields["root"] = hexutil.Bytes(receipt.PostState)
|
||||
|
|
|
|||
Loading…
Reference in a new issue