mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31: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,14 +888,24 @@ pub fn new_full<RuntimeApi, Executor, OverseerGenerator>(
|
|||||||
// after the given pause block is finalized and restarting after the
|
// after the given pause block is finalized and restarting after the
|
||||||
// given delay.
|
// given delay.
|
||||||
let builder = grandpa::VotingRulesBuilder::default();
|
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 {
|
let builder = if let Some(ref overseer) = overseer_handler {
|
||||||
|
if enable_approval_checking_voting_rule {
|
||||||
builder.add(grandpa_support::ApprovalCheckingVotingRule::new(
|
builder.add(grandpa_support::ApprovalCheckingVotingRule::new(
|
||||||
overseer.clone(),
|
overseer.clone(),
|
||||||
prometheus_registry.as_ref(),
|
prometheus_registry.as_ref(),
|
||||||
)?)
|
)?)
|
||||||
} else {
|
} else {
|
||||||
builder
|
builder
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
builder
|
||||||
};
|
};
|
||||||
|
|
||||||
let voting_rule = match grandpa_pause {
|
let voting_rule = match grandpa_pause {
|
||||||
|
|||||||
Reference in New Issue
Block a user