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

sc-transcation-pool refactor #9228

Merged
17 commits merged into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 32 additions & 22 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ members = [
"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.11.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.9.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
2 changes: 1 addition & 1 deletion bin/node/bench/src/txpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ sp-keyring = { version = "3.0.0", path = "../../../primitives/keyring" }
sp-keystore = { version = "0.9.0", path = "../../../primitives/keystore" }
sp-io = { version = "3.0.0", path = "../../../primitives/io" }
sp-consensus = { version = "0.9.0", path = "../../../primitives/consensus/common" }
sp-transaction-pool = { version = "3.0.0", path = "../../../primitives/transaction-pool" }

# client dependencies
sc-client-api = { version = "3.0.0", path = "../../../client/api" }
sc-chain-spec = { version = "3.0.0", path = "../../../client/chain-spec" }
sc-consensus = { version = "0.9.0", path = "../../../client/consensus/common" }
sc-transaction-pool = { version = "3.0.0", path = "../../../client/transaction-pool" }
sc-transaction-pool-api = { version = "3.0.0", path = "../../../client/transaction-pool/api" }
sc-network = { version = "0.9.0", path = "../../../client/network" }
sc-consensus-slots = { version = "0.9.0", path = "../../../client/consensus/slots" }
sc-consensus-babe = { version = "0.9.0", path = "../../../client/consensus/babe" }
Expand Down
2 changes: 1 addition & 1 deletion bin/node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ mod tests {
use sc_service_test::TestNetNode;
use crate::service::{new_full_base, new_light_base, NewFullBase};
use sp_runtime::{key_types::BABE, traits::IdentifyAccount, RuntimeAppPublic};
use sp_transaction_pool::{MaintainedTransactionPool, ChainEvent};
use sc_transaction_pool_api::{MaintainedTransactionPool, ChainEvent};
use sc_client_api::BlockBackend;
use sc_keystore::LocalKeystore;
use sp_inherents::InherentDataProvider;
Expand Down
2 changes: 1 addition & 1 deletion bin/node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ sp-keystore = { version = "0.9.0", path = "../../../primitives/keystore" }
sp-consensus = { version = "0.9.0", path = "../../../primitives/consensus/common" }
sp-consensus-babe = { version = "0.9.0", path = "../../../primitives/consensus/babe" }
sp-runtime = { version = "3.0.0", path = "../../../primitives/runtime" }
sp-transaction-pool = { version = "3.0.0", path = "../../../primitives/transaction-pool" }
sc-transaction-pool-api = { version = "3.0.0", path = "../../../client/transaction-pool/api" }
substrate-frame-rpc-system = { version = "3.0.0", path = "../../../utils/frame/rpc/system" }
Loading