sc-transcation-pool refactor (#9228)

* Use TransactionPool trait

* sc-transaction-pool-primitives

* sc-transaction-pool-api

* TP

* bye sc_transaction_graph

* fix line widths

* fix import errors

* fix import errors

* fix import errors 🤦🏾‍♂️

* fix import errors 🤦🏾‍♂️🤦🏾‍♂️🤦🏾‍♂️

* remove sp-keyring
This commit is contained in:
Seun Lanlege
2021-07-08 14:33:34 +01:00
committed by GitHub
parent 721a3b9e9c
commit 2ae9d36758
65 changed files with 384 additions and 388 deletions
+1 -1
View File
@@ -26,7 +26,6 @@ kvdb-rocksdb = "0.12.0"
sp-trie = { version = "3.0.0", path = "../../../primitives/trie" }
sp-core = { version = "3.0.0", path = "../../../primitives/core" }
sp-consensus = { version = "0.9.0", path = "../../../primitives/consensus/common" }
sp-transaction-pool = { version = "3.0.0", path = "../../../primitives/transaction-pool" }
sc-basic-authorship = { version = "0.9.0", path = "../../../client/basic-authorship" }
sp-inherents = { version = "3.0.0", path = "../../../primitives/inherents" }
sp-timestamp = { version = "3.0.0", default-features = false, path = "../../../primitives/timestamp" }
@@ -40,4 +39,5 @@ lazy_static = "1.4.0"
parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] }
parity-db = { version = "0.2.4" }
sc-transaction-pool = { version = "3.0.0", path = "../../../client/transaction-pool" }
sc-transaction-pool-api = { version = "3.0.0", path = "../../../client/transaction-pool/api" }
futures = { version = "0.3.4", features = ["thread-pool"] }
+4 -4
View File
@@ -39,7 +39,7 @@ use sp_runtime::{
traits::NumberFor,
OpaqueExtrinsic,
};
use sp_transaction_pool::{
use sc_transaction_pool_api::{
ImportNotificationStream,
PoolFuture,
PoolStatus,
@@ -198,7 +198,7 @@ impl From<OpaqueExtrinsic> for PoolTransaction {
}
}
impl sp_transaction_pool::InPoolTransaction for PoolTransaction {
impl sc_transaction_pool_api::InPoolTransaction for PoolTransaction {
type Transaction = OpaqueExtrinsic;
type Hash = node_primitives::Hash;
@@ -224,11 +224,11 @@ impl sp_transaction_pool::InPoolTransaction for PoolTransaction {
#[derive(Clone, Debug)]
pub struct Transactions(Vec<Arc<PoolTransaction>>);
impl sp_transaction_pool::TransactionPool for Transactions {
impl sc_transaction_pool_api::TransactionPool for Transactions {
type Block = Block;
type Hash = node_primitives::Hash;
type InPoolTransaction = PoolTransaction;
type Error = sp_transaction_pool::error::Error;
type Error = sc_transaction_pool_api::error::Error;
/// Returns a future that imports a bunch of unverified transactions to the pool.
fn submit_at(
+1 -1
View File
@@ -27,7 +27,7 @@ use node_testing::bench::{BenchDb, Profile, BlockType, KeyTypes, DatabaseType};
use sc_transaction_pool::BasicPool;
use sp_runtime::generic::BlockId;
use sp_transaction_pool::{TransactionPool, TransactionSource};
use sc_transaction_pool_api::{TransactionPool, TransactionSource};
use crate::core::{self, Path, Mode};