mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
fix GetTransactionReceiptsByBlock bug
fix fields transactionHash
This commit is contained in:
parent
7e79f82a31
commit
aecdd74dc8
1 changed files with 2 additions and 1 deletions
|
|
@ -670,6 +670,7 @@ func (s *PublicBlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context,
|
|||
"contractAddress": nil,
|
||||
"logs": receipt.Logs,
|
||||
"logsBloom": receipt.Bloom,
|
||||
"type": hexutil.Uint(tx.Type()),
|
||||
}
|
||||
|
||||
// Assign receipt status or post state.
|
||||
|
|
@ -681,7 +682,7 @@ func (s *PublicBlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context,
|
|||
if receipt.Logs == nil {
|
||||
fields["logs"] = [][]*types.Log{}
|
||||
}
|
||||
if borReceipt != nil {
|
||||
if borReceipt != nil && idx == len(receipts)-1 {
|
||||
fields["transactionHash"] = txHash
|
||||
}
|
||||
// If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation
|
||||
|
|
|
|||
Loading…
Reference in a new issue