mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 01:01:01 +00:00
grandpa: allow authority set hard forks to be forced (#10444)
* grandpa: allow authority set hard forks to be forced * grandpa: fix authority set hard forks in warp proof provider * grandpa: make AuthoritySetHardFork public * grandpa: extend comment
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
use sp_runtime::codec::{self, Decode, Encode};
|
||||
|
||||
use crate::{
|
||||
best_justification, find_scheduled_change, AuthoritySetChanges, BlockNumberOps,
|
||||
GrandpaJustification, SharedAuthoritySet,
|
||||
best_justification, find_scheduled_change, AuthoritySetChanges, AuthoritySetHardFork,
|
||||
BlockNumberOps, GrandpaJustification, SharedAuthoritySet,
|
||||
};
|
||||
use sc_client_api::Backend as ClientBackend;
|
||||
use sc_network::warp_request_handler::{EncodedProof, VerificationResult, WarpSyncProvider};
|
||||
@@ -255,12 +255,15 @@ where
|
||||
pub fn new(
|
||||
backend: Arc<Backend>,
|
||||
authority_set: SharedAuthoritySet<Block::Hash, NumberFor<Block>>,
|
||||
hard_forks: Vec<(SetId, (Block::Hash, NumberFor<Block>), AuthorityList)>,
|
||||
hard_forks: Vec<AuthoritySetHardFork<Block>>,
|
||||
) -> Self {
|
||||
NetworkProvider {
|
||||
backend,
|
||||
authority_set,
|
||||
hard_forks: hard_forks.into_iter().map(|(s, hn, list)| (hn, (s, list))).collect(),
|
||||
hard_forks: hard_forks
|
||||
.into_iter()
|
||||
.map(|fork| (fork.block, (fork.set_id, fork.authorities)))
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user