mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-09 21:43:47 +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),
|
"effectiveGasPrice": (*hexutil.Big)(receipt.EffectiveGasPrice),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if receipt.EffectiveGasPrice == nil {
|
||||||
|
fields["effectiveGasPrice"] = new(hexutil.Big)
|
||||||
|
}
|
||||||
|
|
||||||
// Assign receipt status or post state.
|
// Assign receipt status or post state.
|
||||||
if len(receipt.PostState) > 0 {
|
if len(receipt.PostState) > 0 {
|
||||||
fields["root"] = hexutil.Bytes(receipt.PostState)
|
fields["root"] = hexutil.Bytes(receipt.PostState)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue