mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
polkadot: remove grandpa pause support (#2511)
This was never used and we probably don't need it anyway.
This commit is contained in:
@@ -623,7 +623,6 @@ where
|
||||
#[cfg(feature = "full-node")]
|
||||
pub struct NewFullParams<OverseerGenerator: OverseerGen> {
|
||||
pub is_parachain_node: IsParachainNode,
|
||||
pub grandpa_pause: Option<(u32, u32)>,
|
||||
pub enable_beefy: bool,
|
||||
/// Whether to enable the block authoring backoff on production networks
|
||||
/// where it isn't enabled by default.
|
||||
@@ -717,7 +716,6 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
|
||||
mut config: Configuration,
|
||||
NewFullParams {
|
||||
is_parachain_node,
|
||||
grandpa_pause,
|
||||
enable_beefy,
|
||||
force_authoring_backoff,
|
||||
jaeger_agent,
|
||||
@@ -1248,32 +1246,14 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
|
||||
// provide better guarantees of block and vote data availability than
|
||||
// the observer.
|
||||
|
||||
// add a custom voting rule to temporarily stop voting for new blocks
|
||||
// after the given pause block is finalized and restarting after the
|
||||
// given delay.
|
||||
let mut builder = grandpa::VotingRulesBuilder::default();
|
||||
let mut voting_rules_builder = grandpa::VotingRulesBuilder::default();
|
||||
|
||||
#[cfg(not(feature = "malus"))]
|
||||
let _malus_finality_delay = None;
|
||||
|
||||
if let Some(delay) = _malus_finality_delay {
|
||||
info!(?delay, "Enabling malus finality delay",);
|
||||
builder = builder.add(grandpa::BeforeBestBlockBy(delay));
|
||||
};
|
||||
|
||||
let voting_rule = match grandpa_pause {
|
||||
Some((block, delay)) => {
|
||||
info!(
|
||||
block_number = %block,
|
||||
delay = %delay,
|
||||
"GRANDPA scheduled voting pause set for block #{} with a duration of {} blocks.",
|
||||
block,
|
||||
delay,
|
||||
);
|
||||
|
||||
builder.add(grandpa_support::PauseAfterBlockFor(block, delay)).build()
|
||||
},
|
||||
None => builder.build(),
|
||||
voting_rules_builder = voting_rules_builder.add(grandpa::BeforeBestBlockBy(delay));
|
||||
};
|
||||
|
||||
let grandpa_config = grandpa::GrandpaParams {
|
||||
@@ -1281,7 +1261,7 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
|
||||
link: link_half,
|
||||
network: network.clone(),
|
||||
sync: sync_service.clone(),
|
||||
voting_rule,
|
||||
voting_rule: voting_rules_builder.build(),
|
||||
prometheus_registry: prometheus_registry.clone(),
|
||||
shared_voter_state,
|
||||
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
||||
|
||||
Reference in New Issue
Block a user