mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
disable approval-checking voting rule (#3321)
This commit is contained in:
Generated
+161
-159
File diff suppressed because it is too large
Load Diff
@@ -888,12 +888,22 @@ pub fn new_full<RuntimeApi, Executor, OverseerGenerator>(
|
||||
// after the given pause block is finalized and restarting after the
|
||||
// given delay.
|
||||
let builder = grandpa::VotingRulesBuilder::default();
|
||||
// we should enable approval checking voting rule before we deploy parachains on polkadot
|
||||
let enable_approval_checking_voting_rule = chain_spec.is_kusama()
|
||||
|| chain_spec.is_westend()
|
||||
|| chain_spec.is_rococo()
|
||||
|| chain_spec.is_wococo()
|
||||
|| chain_spec.is_dev();
|
||||
|
||||
let builder = if let Some(ref overseer) = overseer_handler {
|
||||
builder.add(grandpa_support::ApprovalCheckingVotingRule::new(
|
||||
overseer.clone(),
|
||||
prometheus_registry.as_ref(),
|
||||
)?)
|
||||
if enable_approval_checking_voting_rule {
|
||||
builder.add(grandpa_support::ApprovalCheckingVotingRule::new(
|
||||
overseer.clone(),
|
||||
prometheus_registry.as_ref(),
|
||||
)?)
|
||||
} else {
|
||||
builder
|
||||
}
|
||||
} else {
|
||||
builder
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user