Exposing state root and logsBloom in RPC receipts (#3174)
Former-commit-id: 6eeb7a3e5c8354ec9de4027a9d7668b8bf29f4a2
This commit is contained in:
committed by
Tomasz Drwięga
parent
f52aee83bc
commit
f264d10cc5
@@ -1050,7 +1050,9 @@ impl BlockChainClient for Client {
|
||||
transaction_hash: transaction_hash.clone(),
|
||||
transaction_index: transaction_index,
|
||||
log_index: i
|
||||
}).collect()
|
||||
}).collect(),
|
||||
log_bloom: receipt.log_bloom,
|
||||
state_root: receipt.state_root,
|
||||
})
|
||||
},
|
||||
_ => None
|
||||
|
||||
@@ -935,6 +935,8 @@ impl MinerService for Miner {
|
||||
}
|
||||
},
|
||||
logs: receipt.logs.clone(),
|
||||
log_bloom: receipt.log_bloom,
|
||||
state_root: receipt.state_root,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ pub struct RichReceipt {
|
||||
pub contract_address: Option<Address>,
|
||||
/// Logs
|
||||
pub logs: Vec<LogEntry>,
|
||||
/// Logs bloom
|
||||
pub log_bloom: LogBloom,
|
||||
/// State root
|
||||
pub state_root: H256,
|
||||
}
|
||||
|
||||
/// Receipt with additional info.
|
||||
@@ -114,6 +118,10 @@ pub struct LocalizedReceipt {
|
||||
pub contract_address: Option<Address>,
|
||||
/// Logs
|
||||
pub logs: Vec<LocalizedLogEntry>,
|
||||
/// Logs bloom
|
||||
pub log_bloom: LogBloom,
|
||||
/// State root
|
||||
pub state_root: H256,
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user