mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +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
@@ -22,7 +22,7 @@
|
||||
|
||||
use std::sync::{Weak, Arc};
|
||||
use codec::Decode;
|
||||
use primitives::{
|
||||
use sp_core::{
|
||||
ExecutionContext,
|
||||
offchain::{self, OffchainExt, TransactionPoolExt},
|
||||
traits::{BareCryptoStorePtr, KeystoreExt},
|
||||
@@ -31,8 +31,8 @@ use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits,
|
||||
};
|
||||
use state_machine::{ExecutionStrategy, ExecutionManager, DefaultHandler};
|
||||
use externalities::Extensions;
|
||||
use sp_state_machine::{ExecutionStrategy, ExecutionManager, DefaultHandler};
|
||||
use sp_externalities::Extensions;
|
||||
use parking_lot::RwLock;
|
||||
|
||||
/// Execution strategies settings.
|
||||
@@ -70,7 +70,7 @@ impl Default for ExecutionStrategies {
|
||||
pub struct ExecutionExtensions<Block: traits::Block> {
|
||||
strategies: ExecutionStrategies,
|
||||
keystore: Option<BareCryptoStorePtr>,
|
||||
transaction_pool: RwLock<Option<Weak<dyn txpool_api::OffchainSubmitTransaction<Block>>>>,
|
||||
transaction_pool: RwLock<Option<Weak<dyn sp_transaction_pool::OffchainSubmitTransaction<Block>>>>,
|
||||
}
|
||||
|
||||
impl<Block: traits::Block> Default for ExecutionExtensions<Block> {
|
||||
@@ -104,7 +104,7 @@ impl<Block: traits::Block> ExecutionExtensions<Block> {
|
||||
/// extension to be a `Weak` reference.
|
||||
/// That's also the reason why it's being registered lazily instead of
|
||||
/// during initialisation.
|
||||
pub fn register_transaction_pool(&self, pool: Weak<dyn txpool_api::OffchainSubmitTransaction<Block>>) {
|
||||
pub fn register_transaction_pool(&self, pool: Weak<dyn sp_transaction_pool::OffchainSubmitTransaction<Block>>) {
|
||||
*self.transaction_pool.write() = Some(pool);
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ impl<Block: traits::Block> ExecutionExtensions<Block> {
|
||||
/// A wrapper type to pass `BlockId` to the actual transaction pool.
|
||||
struct TransactionPoolAdapter<Block: traits::Block> {
|
||||
at: BlockId<Block>,
|
||||
pool: Arc<dyn txpool_api::OffchainSubmitTransaction<Block>>,
|
||||
pool: Arc<dyn sp_transaction_pool::OffchainSubmitTransaction<Block>>,
|
||||
}
|
||||
|
||||
impl<Block: traits::Block> offchain::TransactionPool for TransactionPoolAdapter<Block> {
|
||||
|
||||
Reference in New Issue
Block a user