mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
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:
@@ -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"] }
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -48,7 +48,7 @@ use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend};
|
||||
use sp_consensus::SelectChain;
|
||||
use sp_consensus_babe::BabeApi;
|
||||
use sc_rpc::SubscriptionTaskExecutor;
|
||||
use sp_transaction_pool::TransactionPool;
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
use sc_client_api::AuxStore;
|
||||
|
||||
/// Light client extra dependencies.
|
||||
|
||||
Reference in New Issue
Block a user