Refactoring Checkpoint: (WIP)

This commit is contained in:
2025-12-14 10:29:31 +03:00
parent 09735eb97a
commit c89d7cac55
1424 changed files with 6415 additions and 6064 deletions
+6 -6
View File
@@ -29,13 +29,13 @@ use pezsp_runtime::{
traits::Hash as HashT, transaction_validity::InvalidTransaction, ApplyExtrinsicResult,
};
use kitchensink_runtime::{
use pez_kitchensink_runtime::{
constants::{currency::*, time::SLOT_DURATION},
Balances, CheckedExtrinsic, Header, Runtime, RuntimeCall, RuntimeEvent, System,
TransactionPayment, Treasury, UncheckedExtrinsic,
};
use node_primitives::{Balance, Hash};
use node_testing::keyring::*;
use pez_node_primitives::{Balance, Hash};
use pez_node_testing::keyring::*;
use pretty_assertions::assert_eq;
use wat;
@@ -48,7 +48,7 @@ use self::common::{sign, *};
/// have to execute provided wasm code instead of the native equivalent. This trick is used to
/// test code paths that differ between native and wasm versions.
pub fn bloaty_code_unwrap() -> &'static [u8] {
kitchensink_runtime::WASM_BINARY_BLOATY.expect(
pez_kitchensink_runtime::WASM_BINARY_BLOATY.expect(
"Development wasm binary is not available. \
Testing is only supported with the flag disabled.",
)
@@ -857,14 +857,14 @@ fn successful_execution_gives_ok() {
#[test]
fn should_import_block_with_test_client() {
use node_testing::client::{
use pez_node_testing::client::{
pezsp_consensus::BlockOrigin, ClientBlockImportExt, TestClientBuilder, TestClientBuilderExt,
};
let client = TestClientBuilder::new().build();
let block1 = changes_trie_block();
let block_data = block1.0;
let block = node_primitives::Block::decode(&mut &block_data[..]).unwrap();
let block = pez_node_primitives::Block::decode(&mut &block_data[..]).unwrap();
futures::executor::block_on(client.import(BlockOrigin::Own, block)).unwrap();
}
+8 -8
View File
@@ -36,12 +36,12 @@ use pezsp_runtime::{
};
use pezsp_state_machine::TestExternalities as CoreTestExternalities;
use kitchensink_runtime::{
use pez_kitchensink_runtime::{
constants::currency::*, Block, BuildStorage, CheckedExtrinsic, Header, Runtime,
UncheckedExtrinsic,
};
use node_primitives::{BlockNumber, Hash};
use node_testing::keyring::*;
use pez_node_primitives::{BlockNumber, Hash};
use pez_node_testing::keyring::*;
use pezsp_externalities::Externalities;
use pezstaging_node_cli::service::RuntimeExecutor;
@@ -70,7 +70,7 @@ impl AppCrypto<MultiSigner, MultiSignature> for TestAuthorityId {
/// making the binary slimmer. There is a convention to use compact version of the runtime
/// as canonical.
pub fn compact_code_unwrap() -> &'static [u8] {
kitchensink_runtime::WASM_BINARY.expect(
pez_kitchensink_runtime::WASM_BINARY.expect(
"Development wasm binary is not available. Testing is only supported with the flag \
disabled.",
)
@@ -78,14 +78,14 @@ pub fn compact_code_unwrap() -> &'static [u8] {
pub const GENESIS_HASH: [u8; 32] = [69u8; 32];
pub const SPEC_VERSION: u32 = kitchensink_runtime::VERSION.spec_version;
pub const SPEC_VERSION: u32 = pez_kitchensink_runtime::VERSION.spec_version;
pub const TRANSACTION_VERSION: u32 = kitchensink_runtime::VERSION.transaction_version;
pub const TRANSACTION_VERSION: u32 = pez_kitchensink_runtime::VERSION.transaction_version;
pub type TestExternalities<H> = CoreTestExternalities<H>;
pub fn sign(xt: CheckedExtrinsic) -> UncheckedExtrinsic {
node_testing::keyring::sign(xt, SPEC_VERSION, TRANSACTION_VERSION, GENESIS_HASH, None)
pez_node_testing::keyring::sign(xt, SPEC_VERSION, TRANSACTION_VERSION, GENESIS_HASH, None)
}
pub fn default_transfer_call() -> pezpallet_balances::Call<Runtime> {
@@ -125,7 +125,7 @@ pub fn new_test_ext(code: &[u8]) -> TestExternalities<BlakeTwo256> {
pezsp_tracing::try_init_simple();
let ext = TestExternalities::new_with_code(
code,
node_testing::genesis::config().build_storage().unwrap(),
pez_node_testing::genesis::config().build_storage().unwrap(),
);
ext
}
+3 -3
View File
@@ -22,13 +22,13 @@ use pezframe_support::{
traits::Currency,
weights::{constants::ExtrinsicBaseWeight, IdentityFee, WeightToFee},
};
use kitchensink_runtime::{
use pez_kitchensink_runtime::{
constants::{currency::*, time::SLOT_DURATION},
Balances, CheckedExtrinsic, Multiplier, Runtime, RuntimeCall, TransactionByteFee,
TransactionPayment,
};
use node_primitives::Balance;
use node_testing::keyring::*;
use pez_node_primitives::Balance;
use pez_node_testing::keyring::*;
use pezkuwi_sdk::*;
use pezsp_runtime::{traits::One, Perbill};
@@ -18,7 +18,7 @@
use codec::Decode;
use pezframe_system::offchain::{SendSignedTransaction, Signer, SubmitTransaction};
use kitchensink_runtime::{Executive, ExistentialDeposit, Indices, Runtime, UncheckedExtrinsic};
use pez_kitchensink_runtime::{Executive, ExistentialDeposit, Indices, Runtime, UncheckedExtrinsic};
use pezkuwi_sdk::*;
use pezsp_application_crypto::AppCrypto;
use pezsp_core::offchain::{testing::TestTransactionPoolExt, TransactionPoolExt};