Cleanup transaction pool deps (#4782)

* Cleanup transaction pool deps

* Fix it properly

* Fix doc test
This commit is contained in:
Bastian Köcher
2020-01-31 12:40:32 +01:00
committed by GitHub
parent ce47bfa2ba
commit 709a899f9d
19 changed files with 140 additions and 69 deletions
@@ -306,7 +306,9 @@ mod tests {
fn should_cease_building_block_when_deadline_is_reached() {
// given
let client = Arc::new(substrate_test_runtime_client::new());
let txpool = Arc::new(BasicPool::new(Default::default(), FullChainApi::new(client.clone())));
let txpool = Arc::new(
BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone())))
);
futures::executor::block_on(
txpool.submit_at(&BlockId::number(0), vec![extrinsic(0), extrinsic(1)])
@@ -346,7 +348,9 @@ mod tests {
let (client, backend) = substrate_test_runtime_client::TestClientBuilder::new()
.build_with_backend();
let client = Arc::new(client);
let txpool = Arc::new(BasicPool::new(Default::default(), FullChainApi::new(client.clone())));
let txpool = Arc::new(
BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone())))
);
let genesis_hash = client.info().best_hash;
let block_id = BlockId::Hash(genesis_hash);