mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 11:11:17 +00:00
Simplify a few chain components creation APIs related to the service (#6611)
* Simplify a few chain components creation APIs related to the service * Fix basic-authorship doc tests * Remove DefaultQueue * Update client/service/src/builder.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Move ExecutionExtensions comment around * Remove unused BlakeTwo256 Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -212,7 +212,6 @@ mod tests {
|
||||
use substrate_test_runtime_client::{TestClient, runtime::Block};
|
||||
use sc_transaction_pool::{BasicPool, FullChainApi};
|
||||
use sp_transaction_pool::{TransactionPool, InPoolTransaction};
|
||||
use sc_client_api::ExecutorProvider;
|
||||
|
||||
struct MockNetworkStateInfo();
|
||||
|
||||
@@ -227,7 +226,7 @@ mod tests {
|
||||
}
|
||||
|
||||
struct TestPool(
|
||||
BasicPool<FullChainApi<TestClient, Block>, Block>
|
||||
Arc<BasicPool<FullChainApi<TestClient, Block>, Block>>
|
||||
);
|
||||
|
||||
impl sp_transaction_pool::OffchainSubmitTransaction<Block> for TestPool {
|
||||
@@ -248,13 +247,14 @@ mod tests {
|
||||
let _ = env_logger::try_init();
|
||||
|
||||
let client = Arc::new(substrate_test_runtime_client::new());
|
||||
let pool = Arc::new(TestPool(BasicPool::new(
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let pool = TestPool(BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
).0));
|
||||
client.execution_extensions()
|
||||
.register_transaction_pool(Arc::downgrade(&pool.clone()) as _);
|
||||
spawner,
|
||||
client.clone(),
|
||||
));
|
||||
let db = sc_client_db::offchain::LocalStorage::new_test();
|
||||
let network_state = Arc::new(MockNetworkStateInfo());
|
||||
let header = client.header(&BlockId::number(0)).unwrap().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user