Merge pull request #641 from ethcore/jsonrpc_interfaces

jsonrpc uses client and sync interfaces
This commit is contained in:
Gav Wood
2016-03-10 15:44:05 +01:00
6 changed files with 81 additions and 58 deletions

View File

@@ -25,6 +25,7 @@ use ethcore::receipt::Receipt;
use ethcore::transaction::{LocalizedTransaction, Transaction, Action};
use ethcore::filter::Filter;
use ethcore::log_entry::LocalizedLogEntry;
use ethcore::block::ClosedBlock;
pub struct TestBlockChainClient {
pub blocks: RwLock<HashMap<H256, Bytes>>,
@@ -160,6 +161,14 @@ impl BlockChainClient for TestBlockChainClient {
unimplemented!();
}
fn sealing_block(&self) -> &Mutex<Option<ClosedBlock>> {
unimplemented!();
}
fn submit_seal(&self, _pow_hash: H256, _seal: Vec<Bytes>) -> Result<(), Error> {
unimplemented!();
}
fn block_header(&self, id: BlockId) -> Option<Bytes> {
self.block_hash(id).and_then(|hash| self.blocks.read().unwrap().get(&hash).map(|r| Rlp::new(r).at(0).as_raw().to_vec()))
}