mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 04:01:10 +00:00
[big refactor] Remove crate aliasing. (#4395)
* Rename: Phase 1. * Unify codec. * Fixing: Phase 2 * Fixing: Phase 3. * Fixing: Phase 4. * Fixing: Phase 5. * Fixing: Phase 6. * Fixing: Phase 7. * Fixing: Phase 8. Tests * Fixing: Phase 9. Tests!!! * Fixing: Phase 10. Moar tests! * Finally done! * More fixes. * Rename primitives:: to sp_core:: * Apply renames in finality-grandpa. * Fix benches. * Fix benches 2. * Revert node-template. * Fix frame-system in our modules.
This commit is contained in:
committed by
Gavin Wood
parent
f14d98a439
commit
8778ca7dc8
@@ -26,7 +26,7 @@ pub mod error;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
pub use txpool;
|
||||
pub use sc_transaction_graph as txpool;
|
||||
pub use crate::api::{FullChainApi, LightChainApi};
|
||||
pub use crate::maintainer::{FullBasicPoolMaintainer, LightBasicPoolMaintainer};
|
||||
|
||||
@@ -37,7 +37,7 @@ use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::Block as BlockT,
|
||||
};
|
||||
use txpool_api::{
|
||||
use sp_transaction_pool::{
|
||||
TransactionPool, PoolStatus, ImportNotificationStream,
|
||||
TxHash, TransactionFor, TransactionStatusStreamFor,
|
||||
};
|
||||
@@ -46,25 +46,25 @@ use txpool_api::{
|
||||
pub struct BasicPool<PoolApi, Block>
|
||||
where
|
||||
Block: BlockT,
|
||||
PoolApi: txpool::ChainApi<Block=Block, Hash=Block::Hash>,
|
||||
PoolApi: sc_transaction_graph::ChainApi<Block=Block, Hash=Block::Hash>,
|
||||
{
|
||||
pool: Arc<txpool::Pool<PoolApi>>,
|
||||
pool: Arc<sc_transaction_graph::Pool<PoolApi>>,
|
||||
}
|
||||
|
||||
impl<PoolApi, Block> BasicPool<PoolApi, Block>
|
||||
where
|
||||
Block: BlockT,
|
||||
PoolApi: txpool::ChainApi<Block=Block, Hash=Block::Hash>,
|
||||
PoolApi: sc_transaction_graph::ChainApi<Block=Block, Hash=Block::Hash>,
|
||||
{
|
||||
/// Create new basic transaction pool with provided api.
|
||||
pub fn new(options: txpool::Options, pool_api: PoolApi) -> Self {
|
||||
pub fn new(options: sc_transaction_graph::Options, pool_api: PoolApi) -> Self {
|
||||
BasicPool {
|
||||
pool: Arc::new(txpool::Pool::new(options, pool_api)),
|
||||
pool: Arc::new(sc_transaction_graph::Pool::new(options, pool_api)),
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets shared reference to the underlying pool.
|
||||
pub fn pool(&self) -> &Arc<txpool::Pool<PoolApi>> {
|
||||
pub fn pool(&self) -> &Arc<sc_transaction_graph::Pool<PoolApi>> {
|
||||
&self.pool
|
||||
}
|
||||
}
|
||||
@@ -72,11 +72,11 @@ impl<PoolApi, Block> BasicPool<PoolApi, Block>
|
||||
impl<PoolApi, Block> TransactionPool for BasicPool<PoolApi, Block>
|
||||
where
|
||||
Block: BlockT,
|
||||
PoolApi: 'static + txpool::ChainApi<Block=Block, Hash=Block::Hash, Error=error::Error>,
|
||||
PoolApi: 'static + sc_transaction_graph::ChainApi<Block=Block, Hash=Block::Hash, Error=error::Error>,
|
||||
{
|
||||
type Block = PoolApi::Block;
|
||||
type Hash = txpool::ExHash<PoolApi>;
|
||||
type InPoolTransaction = txpool::base_pool::Transaction<TxHash<Self>, TransactionFor<Self>>;
|
||||
type Hash = sc_transaction_graph::ExHash<PoolApi>;
|
||||
type InPoolTransaction = sc_transaction_graph::base_pool::Transaction<TxHash<Self>, TransactionFor<Self>>;
|
||||
type Error = error::Error;
|
||||
|
||||
fn submit_at(
|
||||
|
||||
Reference in New Issue
Block a user