Skip to content

Commit

Permalink
Modify grandpa voting rule by increasing BeforeBestBlockBy to 7 (#1105
Browse files Browse the repository at this point in the history
)

* Increase BeforeBestBlockBy to 7

* Remove useless conversion

---------

Co-authored-by: MOZGIII <[email protected]>
  • Loading branch information
dmitrylavrenov and MOZGIII authored Jul 26, 2024
1 parent 03ae756 commit f5bccf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/humanode-peer/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,10 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
link: grandpa_link,
network: Arc::clone(&network),
sync: Arc::clone(&sync_service),
voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(),
voting_rule: sc_consensus_grandpa::VotingRulesBuilder::new()
.add(sc_consensus_grandpa::BeforeBestBlockBy(7u32))
.add(sc_consensus_grandpa::ThreeQuartersOfTheUnfinalizedChain)
.build(),
prometheus_registry,
shared_voter_state: grandpa_shared_voter_state_cloned,
telemetry: telemetry.as_ref().map(|x| x.handle()),
Expand Down

0 comments on commit f5bccf0

Please sign in to comment.