chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
@@ -35,6 +35,10 @@ use jsonrpsee::{
rpc_params, MethodsError as Error, RpcModule,
};
use bizinikiwi_test_runtime::Transfer;
use bizinikiwi_test_runtime_client::{
prelude::*, runtime, Backend, BlockBuilderExt, Client, ClientBlockImportExt,
};
use pezsc_block_builder::BlockBuilderBuilder;
use pezsc_client_api::ChildInfo;
use pezsc_rpc::testing::TokioTestExecutor;
@@ -46,10 +50,6 @@ use pezsp_runtime::{
SaturatedConversion,
};
use std::{collections::HashMap, sync::Arc};
use bizinikiwi_test_runtime::Transfer;
use bizinikiwi_test_runtime_client::{
prelude::*, runtime, Backend, BlockBuilderExt, Client, ClientBlockImportExt,
};
const CHAIN_GENESIS: [u8; 32] = [0; 32];
const INVALID_HASH: [u8; 32] = [1; 32];
@@ -36,7 +36,6 @@ use pezsc_client_api::{
StaleBlock,
};
use pezsc_rpc::utils::Subscription;
use schnellru::{ByLength, LruMap};
use pezsp_api::CallApiAt;
use pezsp_blockchain::{
Backend as BlockChainBackend, Error as BlockChainError, HeaderBackend, HeaderMetadata, Info,
@@ -45,6 +44,7 @@ use pezsp_runtime::{
traits::{Block as BlockT, Header as HeaderT, NumberFor},
SaturatedConversion, Saturating,
};
use schnellru::{ByLength, LruMap};
use std::{
collections::{HashSet, VecDeque},
sync::Arc,
@@ -579,8 +579,11 @@ where
}
if let Some(best_block_hash) = self.current_best_block {
let ancestor =
pezsp_blockchain::lowest_common_ancestor(&*self.client, *hash, best_block_hash)?;
let ancestor = pezsp_blockchain::lowest_common_ancestor(
&*self.client,
*hash,
best_block_hash,
)?;
// If we end up here and the `best_block` is a descendent of the finalized block
// (last block in the list), it means that there were skipped notifications.
@@ -18,9 +18,9 @@
//! The chain head's event returned as json compatible object.
use serde::{ser::SerializeStruct, Deserialize, Serialize, Serializer};
use pezsp_api::ApiError;
use pezsp_version::RuntimeVersion;
use serde::{ser::SerializeStruct, Deserialize, Serialize, Serializer};
use std::collections::BTreeMap;
use crate::common::events::StorageResult;
@@ -782,16 +782,16 @@ impl<Block: BlockT, BE: Backend<Block>> SubscriptionsInner<Block, BE> {
#[cfg(test)]
mod tests {
use super::*;
use jsonrpsee::ConnectionId;
use pezsc_block_builder::BlockBuilderBuilder;
use pezsc_service::client::new_with_backend;
use pezsp_consensus::BlockOrigin;
use pezsp_core::{testing::TaskExecutor, H256};
use bizinikiwi_test_runtime_client::{
prelude::*,
runtime::{Block, RuntimeApi},
Client, ClientBlockImportExt, GenesisInit,
};
use jsonrpsee::ConnectionId;
use pezsc_block_builder::BlockBuilderBuilder;
use pezsc_service::client::new_with_backend;
use pezsp_consensus::BlockOrigin;
use pezsp_core::{testing::TaskExecutor, H256};
/// Maximum number of ongoing operations per subscription ID.
const MAX_OPERATIONS_PER_SUB: usize = 16;
@@ -18,6 +18,7 @@
//! Test utilities.
use bizinikiwi_test_runtime::{Block, Hash, Header, H256};
use parking_lot::Mutex;
use pezsc_client_api::{
execution_extensions::ExecutionExtensions, BlockBackend, BlockImportNotification,
@@ -36,7 +37,6 @@ use pezsp_runtime::{
};
use pezsp_version::RuntimeVersion;
use std::sync::Arc;
use bizinikiwi_test_runtime::{Block, Hash, Header, H256};
/// A mock client used for testing.
pub struct ChainHeadMockClient<Client> {
@@ -272,15 +272,24 @@ impl<Block: BlockT, Client: BlockBackend<Block>> BlockBackend<Block>
self.client.block(hash)
}
fn block_status(&self, hash: Block::Hash) -> pezsp_blockchain::Result<pezsp_consensus::BlockStatus> {
fn block_status(
&self,
hash: Block::Hash,
) -> pezsp_blockchain::Result<pezsp_consensus::BlockStatus> {
self.client.block_status(hash)
}
fn justifications(&self, hash: Block::Hash) -> pezsp_blockchain::Result<Option<Justifications>> {
fn justifications(
&self,
hash: Block::Hash,
) -> pezsp_blockchain::Result<Option<Justifications>> {
self.client.justifications(hash)
}
fn block_hash(&self, number: NumberFor<Block>) -> pezsp_blockchain::Result<Option<Block::Hash>> {
fn block_hash(
&self,
number: NumberFor<Block>,
) -> pezsp_blockchain::Result<Option<Block::Hash>> {
self.client.block_hash(number)
}
@@ -292,7 +301,10 @@ impl<Block: BlockT, Client: BlockBackend<Block>> BlockBackend<Block>
self.client.has_indexed_transaction(hash)
}
fn block_indexed_body(&self, hash: Block::Hash) -> pezsp_blockchain::Result<Option<Vec<Vec<u8>>>> {
fn block_indexed_body(
&self,
hash: Block::Hash,
) -> pezsp_blockchain::Result<Option<Vec<Vec<u8>>>> {
self.client.block_indexed_body(hash)
}
@@ -23,6 +23,11 @@ use crate::{
hex_string,
};
use assert_matches::assert_matches;
use bizinikiwi_test_runtime::Transfer;
use bizinikiwi_test_runtime_client::{
prelude::*, runtime, runtime::RuntimeApi, Backend, BlockBuilderExt, Client,
ClientBlockImportExt, GenesisInit,
};
use codec::{Decode, Encode};
use futures::Future;
use jsonrpsee::{
@@ -49,11 +54,6 @@ use std::{
sync::Arc,
time::Duration,
};
use bizinikiwi_test_runtime::Transfer;
use bizinikiwi_test_runtime_client::{
prelude::*, runtime, runtime::RuntimeApi, Backend, BlockBuilderExt, Client,
ClientBlockImportExt, GenesisInit,
};
type Header = bizinikiwi_test_runtime_client::runtime::Header;
type Block = bizinikiwi_test_runtime_client::runtime::Block;
@@ -27,9 +27,9 @@ use pezsc_transaction_pool_api::{
use crate::hex_string;
use futures::StreamExt;
use bizinikiwi_test_runtime_transaction_pool::TestApi;
use pezsp_runtime::traits::Block as BlockT;
use std::{collections::HashMap, pin::Pin, sync::Arc};
use bizinikiwi_test_runtime_transaction_pool::TestApi;
use tokio::sync::mpsc;
pub type Block = bizinikiwi_test_runtime_client::runtime::Block;
@@ -24,12 +24,12 @@ use crate::{
Transaction as RpcTransaction, TransactionBroadcast as RpcTransactionBroadcast,
},
};
use bizinikiwi_test_runtime_client::{prelude::*, Client};
use bizinikiwi_test_runtime_transaction_pool::TestApi;
use futures::Future;
use jsonrpsee::RpcModule;
use pezsc_transaction_pool::*;
use std::{pin::Pin, sync::Arc};
use bizinikiwi_test_runtime_client::{prelude::*, Client};
use bizinikiwi_test_runtime_transaction_pool::TestApi;
use crate::transaction::tests::middleware_pool::{MiddlewarePool, MiddlewarePoolRecv};
@@ -18,13 +18,13 @@
use crate::{hex_string, transaction::error::json_rpc_spec};
use assert_matches::assert_matches;
use bizinikiwi_test_runtime_client::Sr25519Keyring::*;
use bizinikiwi_test_runtime_transaction_pool::uxt;
use codec::Encode;
use jsonrpsee::{rpc_params, MethodsError as Error};
use pezsc_transaction_pool::{Options, PoolLimit};
use pezsc_transaction_pool_api::{ChainEvent, MaintainedTransactionPool, TransactionPool};
use std::sync::Arc;
use bizinikiwi_test_runtime_client::Sr25519Keyring::*;
use bizinikiwi_test_runtime_transaction_pool::uxt;
const MAX_TX_PER_CONNECTION: usize = 4;
@@ -21,13 +21,13 @@ use crate::{
transaction::{TransactionBlock, TransactionEvent},
};
use assert_matches::assert_matches;
use bizinikiwi_test_runtime_client::Sr25519Keyring::*;
use bizinikiwi_test_runtime_transaction_pool::uxt;
use codec::Encode;
use jsonrpsee::rpc_params;
use pezsc_transaction_pool_api::{ChainEvent, MaintainedTransactionPool};
use pezsp_core::H256;
use std::{sync::Arc, vec};
use bizinikiwi_test_runtime_client::Sr25519Keyring::*;
use bizinikiwi_test_runtime_transaction_pool::uxt;
// Test helpers.
use crate::transaction::tests::setup::{setup_api_tx, ALICE_NONCE};
@@ -30,7 +30,6 @@ use jsonrpsee::{
ConnectionId, Extensions,
};
use parking_lot::RwLock;
use rand::{distributions::Alphanumeric, Rng};
use pezsc_client_api::BlockchainEvents;
use pezsc_transaction_pool_api::{
error::IntoPoolError, TransactionFor, TransactionPool, TransactionSource,
@@ -38,6 +37,7 @@ use pezsc_transaction_pool_api::{
use pezsp_blockchain::HeaderBackend;
use pezsp_core::Bytes;
use pezsp_runtime::traits::Block as BlockT;
use rand::{distributions::Alphanumeric, Rng};
use std::{collections::HashMap, sync::Arc};
use super::error::ErrorBroadcast;