mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
Merge pull request #1085 from bbaktaeho/fix/eth_api
internal/ethapi: fix GetTransactionReceiptsByBlock method
This commit is contained in:
commit
2be2789ebb
1 changed files with 6 additions and 1 deletions
|
|
@ -723,6 +723,11 @@ func (s *BlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, block
|
||||||
"logs": receipt.Logs,
|
"logs": receipt.Logs,
|
||||||
"logsBloom": receipt.Bloom,
|
"logsBloom": receipt.Bloom,
|
||||||
"type": hexutil.Uint(tx.Type()),
|
"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.
|
// Assign receipt status or post state.
|
||||||
|
|
@ -733,7 +738,7 @@ func (s *BlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, block
|
||||||
}
|
}
|
||||||
|
|
||||||
if receipt.Logs == nil {
|
if receipt.Logs == nil {
|
||||||
fields["logs"] = [][]*types.Log{}
|
fields["logs"] = []*types.Log{}
|
||||||
}
|
}
|
||||||
|
|
||||||
if borReceipt != nil && idx == len(receipts)-1 {
|
if borReceipt != nil && idx == len(receipts)-1 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue