Exposing state root and logsBloom in RPC receipts (#3174)

Former-commit-id: 6eeb7a3e5c8354ec9de4027a9d7668b8bf29f4a2
This commit is contained in:
Tomasz Drwięga
2016-11-04 12:33:13 +01:00
committed by Tomasz Drwięga
parent f52aee83bc
commit f264d10cc5
6 changed files with 52 additions and 23 deletions

View File

@@ -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

View File

@@ -935,6 +935,8 @@ impl MinerService for Miner {
}
},
logs: receipt.logs.clone(),
log_bloom: receipt.log_bloom,
state_root: receipt.state_root,
}
})
}

View File

@@ -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]