fix GetTransactionReceiptsByBlock

This commit is contained in:
bbaktaeho 2023-11-16 23:04:53 +09:00 committed by Shivam Sharma
parent 1b6a8ce362
commit ccb8ff6d21

View file

@ -719,6 +719,11 @@ func (s *BlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, block
"logs": receipt.Logs,
"logsBloom": receipt.Bloom,
"type": hexutil.Uint(tx.Type()),
"effectiveGasPrice": (*hexutil.Big)(receipt.EffectiveGasPrice),
}
if receipt.EffectiveGasPrice == nil {
fields["effectiveGasPrice"] = new(hexutil.Big)
}
// Assign receipt status or post state.
@ -729,7 +734,7 @@ func (s *BlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, block
}
if receipt.Logs == nil {
fields["logs"] = [][]*types.Log{}
fields["logs"] = []*types.Log{}
}
if borReceipt != nil && idx == len(receipts)-1 {