Integrating TransactionQueue with client

This commit is contained in:
Tomasz Drwięga
2016-03-01 22:30:23 +01:00
parent 725e894f9b
commit 7565625ce0
6 changed files with 120 additions and 14 deletions

View File

@@ -123,6 +123,9 @@ pub trait BlockChainClient : Sync + Send {
/// Get block total difficulty.
fn block_total_difficulty(&self, id: BlockId) -> Option<U256>;
/// Get address nonce.
fn nonce(&self, address: &Address) -> U256;
/// Get address code.
fn code(&self, address: &Address) -> Option<Bytes>;
@@ -445,6 +448,10 @@ impl BlockChainClient for Client {
Self::block_hash(&chain, id).and_then(|hash| chain.block_details(&hash)).map(|d| d.total_difficulty)
}
fn nonce(&self, address: &Address) -> U256 {
self.state().nonce(address)
}
fn code(&self, address: &Address) -> Option<Bytes> {
self.state().code(address)
}