From fca0d89227e851cd2df8aeb3e8fdbe047319a9e6 Mon Sep 17 00:00:00 2001 From: marcello33 Date: Mon, 11 Sep 2023 07:46:45 +0200 Subject: [PATCH] internal/ethapi: default effectiveGasPrice when nil --- internal/ethapi/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 4c5b9293a1..ac5edcdfa1 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -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)