mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Refactor to use only chain info (#4516)
This commit is contained in:
committed by
Bastian Köcher
parent
8ecc450fd9
commit
6d06a19f41
@@ -427,7 +427,7 @@ mod tests {
|
||||
let keys: Vec<&ed25519::Pair> = vec![&*alice, &*bob];
|
||||
let dummy_runtime = ::tokio::runtime::Runtime::new().unwrap();
|
||||
let block_factory = |service: &<Factory as service::ServiceFactory>::FullService| {
|
||||
let block_id = BlockId::number(service.client().info().chain.best_number);
|
||||
let block_id = BlockId::number(service.client().chain_info().best_number);
|
||||
let parent_header = service.client().header(&block_id).unwrap().unwrap();
|
||||
let consensus_net = ConsensusNetwork::new(service.network(), service.client().clone());
|
||||
let proposer_factory = consensus::ProposerFactory {
|
||||
@@ -513,7 +513,7 @@ mod tests {
|
||||
.expect("Creates inherent data.");
|
||||
inherent_data.replace_data(sp_finality_tracker::INHERENT_IDENTIFIER, &1u64);
|
||||
|
||||
let parent_id = BlockId::number(service.client().info().chain.best_number);
|
||||
let parent_id = BlockId::number(service.client().chain_info().best_number);
|
||||
let parent_header = service.client().header(&parent_id).unwrap().unwrap();
|
||||
let mut proposer_factory = sc_basic_authority::ProposerFactory {
|
||||
client: service.client(),
|
||||
@@ -580,7 +580,7 @@ mod tests {
|
||||
let to: Address = AccountPublic::from(bob.public()).into_account().into();
|
||||
let from: Address = AccountPublic::from(charlie.public()).into_account().into();
|
||||
let genesis_hash = service.client().block_hash(0).unwrap().unwrap();
|
||||
let best_block_id = BlockId::number(service.client().info().chain.best_number);
|
||||
let best_block_id = BlockId::number(service.client().chain_info().best_number);
|
||||
let version = service.client().runtime_version_at(&best_block_id).unwrap().spec_version;
|
||||
let signer = charlie.clone();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user