mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 16:03:45 +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,
|
"contractAddress": nil,
|
||||||
"logs": receipt.Logs,
|
"logs": receipt.Logs,
|
||||||
"logsBloom": receipt.Bloom,
|
"logsBloom": receipt.Bloom,
|
||||||
|
"type": hexutil.Uint(tx.Type()),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assign receipt status or post state.
|
// Assign receipt status or post state.
|
||||||
|
|
@ -681,7 +682,7 @@ func (s *PublicBlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context,
|
||||||
if receipt.Logs == nil {
|
if receipt.Logs == nil {
|
||||||
fields["logs"] = [][]*types.Log{}
|
fields["logs"] = [][]*types.Log{}
|
||||||
}
|
}
|
||||||
if borReceipt != nil {
|
if borReceipt != nil && idx == len(receipts)-1 {
|
||||||
fields["transactionHash"] = txHash
|
fields["transactionHash"] = txHash
|
||||||
}
|
}
|
||||||
// If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation
|
// If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue