mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +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:
@@ -358,12 +358,13 @@ mod tests {
|
||||
fn should_cease_building_block_when_deadline_is_reached() {
|
||||
// given
|
||||
let client = Arc::new(substrate_test_runtime_client::new());
|
||||
let txpool = Arc::new(
|
||||
BasicPool::new(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
).0
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let txpool = BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
spawner,
|
||||
client.clone(),
|
||||
);
|
||||
|
||||
futures::executor::block_on(
|
||||
@@ -411,12 +412,13 @@ mod tests {
|
||||
#[test]
|
||||
fn should_not_panic_when_deadline_is_reached() {
|
||||
let client = Arc::new(substrate_test_runtime_client::new());
|
||||
let txpool = Arc::new(
|
||||
BasicPool::new(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
).0
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let txpool = BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
spawner,
|
||||
client.clone(),
|
||||
);
|
||||
|
||||
let mut proposer_factory = ProposerFactory::new(client.clone(), txpool.clone(), None);
|
||||
@@ -446,12 +448,13 @@ mod tests {
|
||||
fn proposed_storage_changes_should_match_execute_block_storage_changes() {
|
||||
let (client, backend) = TestClientBuilder::new().build_with_backend();
|
||||
let client = Arc::new(client);
|
||||
let txpool = Arc::new(
|
||||
BasicPool::new(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
).0
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let txpool = BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
spawner,
|
||||
client.clone(),
|
||||
);
|
||||
|
||||
let genesis_hash = client.info().best_hash;
|
||||
@@ -508,12 +511,13 @@ mod tests {
|
||||
fn should_not_remove_invalid_transactions_when_skipping() {
|
||||
// given
|
||||
let mut client = Arc::new(substrate_test_runtime_client::new());
|
||||
let txpool = Arc::new(
|
||||
BasicPool::new(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
).0
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let txpool = BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
None,
|
||||
spawner,
|
||||
client.clone(),
|
||||
);
|
||||
|
||||
futures::executor::block_on(
|
||||
|
||||
Reference in New Issue
Block a user