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
@@ -1,6 +1,21 @@
// Copyright 2020 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Substrate is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use crate::*;
use sc_transaction_graph::{self, Pool};
use sc_transaction_graph::Pool;
use futures::executor::block_on;
use sp_runtime::{
generic::BlockId,
@@ -10,14 +25,14 @@ use substrate_test_runtime_client::{
runtime::{Block, Hash, Index},
AccountKeyring::*,
};
use crate::testing::api::{TestApi, uxt};
use substrate_test_runtime_transaction_pool::{TestApi, uxt};
fn pool() -> Pool<TestApi> {
Pool::new(Default::default(), TestApi::with_alice_nonce(209).into())
}
fn maintained_pool() -> BasicPool<TestApi, Block> {
BasicPool::new(Default::default(), TestApi::with_alice_nonce(209))
BasicPool::new(Default::default(), std::sync::Arc::new(TestApi::with_alice_nonce(209)))
}
#[test]