Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
sc-transcation-pool refactor (#9228)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Seun Lanlege authored Jul 8, 2021
1 parent 9235309 commit d3db3c1
Show file tree
Hide file tree
Showing 65 changed files with 379 additions and 383 deletions.
76 changes: 32 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ members = [
"client/tracing",
"client/tracing/proc-macro",
"client/transaction-pool",
"client/transaction-pool/graph",
"client/transaction-pool/api",
"frame/assets",
"frame/atomic-swap",
"frame/aura",
Expand Down
2 changes: 1 addition & 1 deletion bin/node-template/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sc-telemetry = { version = "3.0.0", path = "../../../client/telemetry" }
sc-keystore = { version = "3.0.0", path = "../../../client/keystore" }
sp-inherents = { version = "3.0.0", path = "../../../primitives/inherents" }
sc-transaction-pool = { version = "3.0.0", path = "../../../client/transaction-pool" }
sp-transaction-pool = { version = "3.0.0", path = "../../../primitives/transaction-pool" }
sc-transaction-pool-api = { version = "3.0.0", path = "../../../client/transaction-pool/api" }
sc-consensus-aura = { version = "0.9.0", path = "../../../client/consensus/aura" }
sp-consensus-aura = { version = "0.9.0", path = "../../../primitives/consensus/aura" }
sp-consensus = { version = "0.9.0", path = "../../../primitives/consensus/common" }
Expand Down
2 changes: 1 addition & 1 deletion bin/node-template/node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use sp_api::ProvideRuntimeApi;
use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend};
use sp_block_builder::BlockBuilder;
pub use sc_rpc_api::DenyUnsafe;
use sp_transaction_pool::TransactionPool;
use sc_transaction_pool_api::TransactionPool;


/// Full client dependencies.
Expand Down
2 changes: 1 addition & 1 deletion bin/node/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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"] }
8 changes: 4 additions & 4 deletions bin/node/bench/src/construct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use sp_runtime::{
traits::NumberFor,
OpaqueExtrinsic,
};
use sp_transaction_pool::{
use sc_transaction_pool_api::{
ImportNotificationStream,
PoolFuture,
PoolStatus,
Expand Down Expand Up @@ -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;

Expand All @@ -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(
Expand Down
Loading

0 comments on commit d3db3c1

Please sign in to comment.