mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Refactor to use only chain info (#4516)
This commit is contained in:
committed by
Bastian Köcher
parent
8ecc450fd9
commit
6d06a19f41
@@ -446,15 +446,15 @@ pub fn sync<G, E, Fb, F, Lb, L, B, ExF, U>(
|
||||
}
|
||||
network.run_until_all_full(
|
||||
|_index, service|
|
||||
service.get().client().info().chain.best_number == (NUM_BLOCKS as u32).into(),
|
||||
service.get().client().chain_info().best_number == (NUM_BLOCKS as u32).into(),
|
||||
|_index, service|
|
||||
service.get().client().info().chain.best_number == (NUM_BLOCKS as u32).into(),
|
||||
service.get().client().chain_info().best_number == (NUM_BLOCKS as u32).into(),
|
||||
);
|
||||
|
||||
info!("Checking extrinsic propagation");
|
||||
let first_service = network.full_nodes[0].1.clone();
|
||||
let first_user_data = &network.full_nodes[0].2;
|
||||
let best_block = BlockId::number(first_service.get().client().info().chain.best_number);
|
||||
let best_block = BlockId::number(first_service.get().client().chain_info().best_number);
|
||||
let extrinsic = extrinsic_factory(&first_service.get(), first_user_data);
|
||||
futures03::executor::block_on(first_service.get().transaction_pool().submit_one(&best_block, extrinsic)).unwrap();
|
||||
network.run_until_all_full(
|
||||
@@ -501,9 +501,9 @@ pub fn consensus<G, E, Fb, F, Lb, L>(
|
||||
}
|
||||
network.run_until_all_full(
|
||||
|_index, service|
|
||||
service.get().client().info().chain.finalized_number >= (NUM_BLOCKS as u32 / 2).into(),
|
||||
service.get().client().chain_info().finalized_number >= (NUM_BLOCKS as u32 / 2).into(),
|
||||
|_index, service|
|
||||
service.get().client().info().chain.best_number >= (NUM_BLOCKS as u32 / 2).into(),
|
||||
service.get().client().chain_info().best_number >= (NUM_BLOCKS as u32 / 2).into(),
|
||||
);
|
||||
|
||||
info!("Adding more peers");
|
||||
@@ -523,8 +523,8 @@ pub fn consensus<G, E, Fb, F, Lb, L>(
|
||||
}
|
||||
network.run_until_all_full(
|
||||
|_index, service|
|
||||
service.get().client().info().chain.finalized_number >= (NUM_BLOCKS as u32).into(),
|
||||
service.get().client().chain_info().finalized_number >= (NUM_BLOCKS as u32).into(),
|
||||
|_index, service|
|
||||
service.get().client().info().chain.best_number >= (NUM_BLOCKS as u32).into(),
|
||||
service.get().client().chain_info().best_number >= (NUM_BLOCKS as u32).into(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user