Public node WASM, performance and fixes (#5734)

This commit is contained in:
Maciej Hirsz
2017-06-12 15:57:16 +02:00
committed by Arkadiy Paronyan
parent edea41d35e
commit b2a42f03eb
32 changed files with 739 additions and 129 deletions

View File

@@ -307,6 +307,11 @@ impl<C, M, S: ?Sized, U> Parity for ParityClient<C, M, S, U> where
}
fn local_transactions(&self) -> Result<BTreeMap<H256, LocalTransactionStatus>, Error> {
// Return nothing if accounts are disabled (running as public node)
if self.accounts.is_none() {
return Ok(BTreeMap::new());
}
let transactions = self.miner.local_transactions();
let block_number = self.client.chain_info().best_block_number;
Ok(transactions