chore: regenerate umbrella crate, fix feature propagation
This commit is contained in:
@@ -23,8 +23,8 @@ use nix::{
|
||||
unistd::Pid,
|
||||
};
|
||||
use pez_node_primitives::{Hash, Header};
|
||||
use regex::Regex;
|
||||
use pezsp_rpc::{list::ListOrValue, number::NumberOrHex};
|
||||
use regex::Regex;
|
||||
use std::{
|
||||
io::{BufRead, BufReader, Read},
|
||||
ops::{Deref, DerefMut},
|
||||
|
||||
@@ -34,13 +34,13 @@ pub use pezsp_runtime::{Storage, StorageChild};
|
||||
use futures::{future::Future, stream::StreamExt};
|
||||
use pezsc_client_api::BlockchainEvents;
|
||||
use pezsc_service::client::{ClientConfig, LocalCallExecutor};
|
||||
use serde::Deserialize;
|
||||
use pezsp_core::{storage::ChildInfo, testing::TaskExecutor};
|
||||
use pezsp_runtime::{
|
||||
codec::Encode,
|
||||
traits::{Block as BlockT, Header},
|
||||
OpaqueExtrinsic,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
pin::Pin,
|
||||
@@ -186,8 +186,10 @@ impl<Block: BlockT, ExecutorDispatch, Backend, G: GenesisInit>
|
||||
pezsc_consensus::LongestChain<Backend, Block>,
|
||||
)
|
||||
where
|
||||
ExecutorDispatch:
|
||||
pezsc_client_api::CallExecutor<Block> + pezsc_executor::RuntimeVersionOf + Clone + 'static,
|
||||
ExecutorDispatch: pezsc_client_api::CallExecutor<Block>
|
||||
+ pezsc_executor::RuntimeVersionOf
|
||||
+ Clone
|
||||
+ 'static,
|
||||
Backend: pezsc_client_api::backend::Backend<Block>,
|
||||
<Backend as pezsc_client_api::backend::Backend<Block>>::OffchainStorage: 'static,
|
||||
{
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
//! Block Builder extensions for tests.
|
||||
|
||||
use bizinikiwi_test_runtime::*;
|
||||
use pezsc_block_builder::BlockBuilderApi;
|
||||
use pezsp_api::{ApiExt, ProvideRuntimeApi};
|
||||
use bizinikiwi_test_runtime::*;
|
||||
|
||||
/// Extension trait for test block builder.
|
||||
pub trait BlockBuilderExt {
|
||||
@@ -43,12 +43,14 @@ pub trait BlockBuilderExt {
|
||||
) -> Result<(), pezsp_blockchain::Error>;
|
||||
}
|
||||
|
||||
impl<'a, A> BlockBuilderExt for pezsc_block_builder::BlockBuilder<'a, bizinikiwi_test_runtime::Block, A>
|
||||
impl<'a, A> BlockBuilderExt
|
||||
for pezsc_block_builder::BlockBuilder<'a, bizinikiwi_test_runtime::Block, A>
|
||||
where
|
||||
A: ProvideRuntimeApi<bizinikiwi_test_runtime::Block>
|
||||
+ pezsp_api::CallApiAt<bizinikiwi_test_runtime::Block>
|
||||
+ 'a,
|
||||
A::Api: BlockBuilderApi<bizinikiwi_test_runtime::Block> + ApiExt<bizinikiwi_test_runtime::Block>,
|
||||
A::Api:
|
||||
BlockBuilderApi<bizinikiwi_test_runtime::Block> + ApiExt<bizinikiwi_test_runtime::Block>,
|
||||
{
|
||||
fn push_transfer(
|
||||
&mut self,
|
||||
|
||||
@@ -23,15 +23,15 @@ pub mod trait_tests;
|
||||
|
||||
mod block_builder_ext;
|
||||
|
||||
pub use pezsc_consensus::LongestChain;
|
||||
use std::sync::Arc;
|
||||
pub use bizinikiwi_test_client::*;
|
||||
pub use bizinikiwi_test_runtime as runtime;
|
||||
pub use pezsc_consensus::LongestChain;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub use self::block_builder_ext::BlockBuilderExt;
|
||||
|
||||
use pezsp_core::storage::ChildInfo;
|
||||
use bizinikiwi_test_runtime::genesismap::GenesisStorageBuilder;
|
||||
use pezsp_core::storage::ChildInfo;
|
||||
|
||||
/// A prelude to import in tests.
|
||||
pub mod prelude {
|
||||
@@ -185,7 +185,10 @@ pub trait TestClientBuilderExt<B>: Sized {
|
||||
}
|
||||
|
||||
impl<B> TestClientBuilderExt<B>
|
||||
for TestClientBuilder<client::LocalCallExecutor<bizinikiwi_test_runtime::Block, B, WasmExecutor>, B>
|
||||
for TestClientBuilder<
|
||||
client::LocalCallExecutor<bizinikiwi_test_runtime::Block, B, WasmExecutor>,
|
||||
B,
|
||||
>
|
||||
where
|
||||
B: pezsc_client_api::backend::Backend<bizinikiwi_test_runtime::Block> + 'static,
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ use std::sync::Arc;
|
||||
use crate::{
|
||||
BlockBuilderExt, ClientBlockImportExt, Sr25519Keyring, TestClientBuilder, TestClientBuilderExt,
|
||||
};
|
||||
use bizinikiwi_test_runtime::Transfer;
|
||||
use futures::executor::block_on;
|
||||
use pezsc_block_builder::BlockBuilderBuilder;
|
||||
use pezsc_client_api::{
|
||||
@@ -33,7 +34,6 @@ use pezsc_client_api::{
|
||||
};
|
||||
use pezsp_consensus::BlockOrigin;
|
||||
use pezsp_runtime::traits::Block as BlockT;
|
||||
use bizinikiwi_test_runtime::Transfer;
|
||||
|
||||
/// helper to test the `leaves` implementation for various backends
|
||||
pub fn test_leaves_for_backend<B: 'static>(backend: Arc<B>)
|
||||
|
||||
@@ -240,7 +240,9 @@ pub mod pezpallet {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn validate_runtime_call<T: pezpallet::Config>(call: &pezpallet::Call<T>) -> TransactionValidity {
|
||||
pub fn validate_runtime_call<T: pezpallet::Config>(
|
||||
call: &pezpallet::Call<T>,
|
||||
) -> TransactionValidity {
|
||||
log::trace!(target: LOG_TARGET, "validate_runtime_call {call:?}");
|
||||
match call {
|
||||
Call::call_do_not_propagate {} =>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Tool for creating the genesis block.
|
||||
|
||||
use super::{
|
||||
currency, bizinikiwi_test_pallet, wasm_binary_unwrap, AccountId, Balance, RuntimeGenesisConfig,
|
||||
bizinikiwi_test_pallet, currency, wasm_binary_unwrap, AccountId, Balance, RuntimeGenesisConfig,
|
||||
};
|
||||
use codec::Encode;
|
||||
use pezsc_service::construct_genesis_block;
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub mod bizinikiwi_test_pallet;
|
||||
#[cfg(feature = "std")]
|
||||
pub mod extrinsic;
|
||||
#[cfg(feature = "std")]
|
||||
pub mod genesismap;
|
||||
pub mod bizinikiwi_test_pallet;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::{vec, vec::Vec};
|
||||
@@ -45,9 +45,9 @@ use pezframe_system::{
|
||||
limits::{BlockLength, BlockWeights},
|
||||
CheckNonce, CheckWeight,
|
||||
};
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_application_crypto::Ss58Codec;
|
||||
use pezsp_keyring::Sr25519Keyring;
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
use pezsp_application_crypto::{ecdsa, ed25519, sr25519, RuntimeAppPublic};
|
||||
|
||||
@@ -61,7 +61,6 @@ use pezsp_trie::{
|
||||
};
|
||||
use trie_db::{Trie, TrieMut};
|
||||
|
||||
use serde_json::json;
|
||||
use pezsp_api::{decl_runtime_apis, impl_runtime_apis};
|
||||
pub use pezsp_core::hash::H256;
|
||||
use pezsp_genesis_builder::PresetId;
|
||||
@@ -77,6 +76,7 @@ use pezsp_runtime::{
|
||||
#[cfg(any(feature = "std", test))]
|
||||
use pezsp_version::NativeVersion;
|
||||
use pezsp_version::RuntimeVersion;
|
||||
use serde_json::json;
|
||||
|
||||
pub use pezsp_consensus_babe::{AllowedSlots, BabeEpochConfiguration, Slot};
|
||||
|
||||
@@ -947,7 +947,8 @@ fn test_read_child_storage() {
|
||||
fn test_witness(proof: StorageProof, root: crate::Hash) {
|
||||
use pezsp_externalities::Externalities;
|
||||
let db: pezsp_trie::MemoryDB<crate::Hashing> = proof.into_memory_db();
|
||||
let backend = pezsp_state_machine::TrieBackendBuilder::<_, crate::Hashing>::new(db, root).build();
|
||||
let backend =
|
||||
pezsp_state_machine::TrieBackendBuilder::<_, crate::Hashing>::new(db, root).build();
|
||||
let mut overlay = pezsp_state_machine::OverlayedChanges::default();
|
||||
let mut ext = pezsp_state_machine::Ext::new(
|
||||
&mut overlay,
|
||||
@@ -1146,9 +1147,11 @@ pub mod storage_key_generator {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use bizinikiwi_test_runtime_client::{
|
||||
prelude::*, runtime::TestAPI, DefaultTestClientBuilderExt, TestClientBuilder,
|
||||
};
|
||||
use codec::Encode;
|
||||
use pezframe_support::dispatch::DispatchInfo;
|
||||
use pretty_assertions::assert_eq;
|
||||
use pezsc_block_builder::BlockBuilderBuilder;
|
||||
use pezsp_api::{ApiExt, ProvideRuntimeApi};
|
||||
use pezsp_consensus::BlockOrigin;
|
||||
@@ -1157,9 +1160,7 @@ mod tests {
|
||||
traits::{DispatchTransaction, Hash as _},
|
||||
transaction_validity::{InvalidTransaction, TransactionSource::External, ValidTransaction},
|
||||
};
|
||||
use bizinikiwi_test_runtime_client::{
|
||||
prelude::*, runtime::TestAPI, DefaultTestClientBuilderExt, TestClientBuilder,
|
||||
};
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn expected_keys_vec_are_matching() {
|
||||
@@ -1351,14 +1352,14 @@ mod tests {
|
||||
mod genesis_builder_tests {
|
||||
use super::*;
|
||||
use crate::genesismap::GenesisStorageBuilder;
|
||||
use pretty_assertions::assert_eq;
|
||||
use pezsc_executor::{error::Result, WasmExecutor};
|
||||
use pezsc_executor_common::runtime_blob::RuntimeBlob;
|
||||
use serde_json::json;
|
||||
use pezsp_application_crypto::Ss58Codec;
|
||||
use pezsp_core::traits::Externalities;
|
||||
use pezsp_genesis_builder::Result as BuildResult;
|
||||
use pezsp_state_machine::BasicExternalities;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
use std::{fs, io::Write};
|
||||
use storage_key_generator::hex;
|
||||
|
||||
|
||||
@@ -20,6 +20,13 @@
|
||||
//! See [`TestApi`] for more information.
|
||||
|
||||
use async_trait::async_trait;
|
||||
use bizinikiwi_test_runtime_client::{
|
||||
runtime::{
|
||||
AccountId, Block, BlockNumber, Extrinsic, ExtrinsicBuilder, Hash, Header, Nonce, Transfer,
|
||||
TransferData,
|
||||
},
|
||||
Sr25519Keyring::{self, *},
|
||||
};
|
||||
use codec::Encode;
|
||||
use parking_lot::RwLock;
|
||||
use pezsc_transaction_pool::{ChainApi, ValidateTransactionPriority};
|
||||
@@ -38,13 +45,6 @@ use std::{
|
||||
collections::{BTreeMap, HashMap, HashSet},
|
||||
sync::Arc,
|
||||
};
|
||||
use bizinikiwi_test_runtime_client::{
|
||||
runtime::{
|
||||
AccountId, Block, BlockNumber, Extrinsic, ExtrinsicBuilder, Hash, Header, Nonce, Transfer,
|
||||
TransferData,
|
||||
},
|
||||
Sr25519Keyring::{self, *},
|
||||
};
|
||||
|
||||
/// Error type used by [`TestApi`].
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
|
||||
Reference in New Issue
Block a user