mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +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
@@ -16,15 +16,15 @@
|
||||
|
||||
//! Block Builder extensions for tests.
|
||||
|
||||
use runtime;
|
||||
use substrate_test_runtime;
|
||||
use sp_runtime::traits::ProvideRuntimeApi;
|
||||
|
||||
use block_builder::BlockBuilderApi;
|
||||
use sc_block_builder::BlockBuilderApi;
|
||||
|
||||
/// Extension trait for test block builder.
|
||||
pub trait BlockBuilderExt {
|
||||
/// Add transfer extrinsic to the block.
|
||||
fn push_transfer(&mut self, transfer: runtime::Transfer) -> Result<(), sp_blockchain::Error>;
|
||||
fn push_transfer(&mut self, transfer: substrate_test_runtime::Transfer) -> Result<(), sp_blockchain::Error>;
|
||||
/// Add storage change extrinsic to the block.
|
||||
fn push_storage_change(
|
||||
&mut self,
|
||||
@@ -33,11 +33,11 @@ pub trait BlockBuilderExt {
|
||||
) -> Result<(), sp_blockchain::Error>;
|
||||
}
|
||||
|
||||
impl<'a, A> BlockBuilderExt for block_builder::BlockBuilder<'a, runtime::Block, A> where
|
||||
impl<'a, A> BlockBuilderExt for sc_block_builder::BlockBuilder<'a, substrate_test_runtime::Block, A> where
|
||||
A: ProvideRuntimeApi + 'a,
|
||||
A::Api: BlockBuilderApi<runtime::Block, Error = sp_blockchain::Error>,
|
||||
A::Api: BlockBuilderApi<substrate_test_runtime::Block, Error = sp_blockchain::Error>,
|
||||
{
|
||||
fn push_transfer(&mut self, transfer: runtime::Transfer) -> Result<(), sp_blockchain::Error> {
|
||||
fn push_transfer(&mut self, transfer: substrate_test_runtime::Transfer) -> Result<(), sp_blockchain::Error> {
|
||||
self.push(transfer.into_signed_tx())
|
||||
}
|
||||
|
||||
@@ -46,6 +46,6 @@ impl<'a, A> BlockBuilderExt for block_builder::BlockBuilder<'a, runtime::Block,
|
||||
key: Vec<u8>,
|
||||
value: Option<Vec<u8>>,
|
||||
) -> Result<(), sp_blockchain::Error> {
|
||||
self.push(runtime::Extrinsic::StorageChange(key, value))
|
||||
self.push(substrate_test_runtime::Extrinsic::StorageChange(key, value))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user