Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
5979a8c3
Commit
5979a8c3
authored
5 years ago
by
Gavin Wood
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Revert "grandpa: voting rules shouldn't restrict past round base (#4150)" (#4154)
This reverts commit
364df309
.
parent
f9a4cff5
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/client/finality-grandpa/src/environment.rs
+1
-11
1 addition, 11 deletions
substrate/client/finality-grandpa/src/environment.rs
with
1 addition
and
11 deletions
substrate/client/finality-grandpa/src/environment.rs
+
1
−
11
View file @
5979a8c3
...
...
@@ -34,7 +34,7 @@ use client_api::{
utils
::
is_descendent_of
,
};
use
client
::{
apply_aux
,
Client
,
apply_aux
,
Client
,
};
use
grandpa
::{
BlockNumberOps
,
Equivocation
,
Error
as
GrandpaError
,
round
::
State
as
RoundState
,
...
...
@@ -497,18 +497,8 @@ where
// note that we pass the original `best_header`, i.e. before the
// authority set limit filter, which can be considered a
// mandatory/implicit voting rule.
//
// we also make sure that the restricted vote is higher than the
// round base (i.e. last finalized), otherwise the value
// returned by the given voting rule is ignored and the original
// target is used instead.
self
.voting_rule
.restrict_vote
(
&*
self
.client
,
&
base_header
,
&
best_header
,
target_header
)
.filter
(|(
_
,
restricted_number
)|
{
// we can only restrict votes within the interval [base, target]
restricted_number
>
base_header
.number
()
&&
restricted_number
<
target_header
.number
()
})
.or
(
Some
((
target_header
.hash
(),
*
target_header
.number
())))
},
Ok
(
None
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment