From 5979a8c3e54e92f0d6433bbd930c5a5dca1ae126 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Wed, 20 Nov 2019 10:48:55 +0100 Subject: [PATCH] Revert "grandpa: voting rules shouldn't restrict past round base (#4150)" (#4154) This reverts commit 364df3097032c5b1fc262150f16f642c4036ef80. --- substrate/client/finality-grandpa/src/environment.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/substrate/client/finality-grandpa/src/environment.rs b/substrate/client/finality-grandpa/src/environment.rs index 679c01edd9..883dc0e35c 100644 --- a/substrate/client/finality-grandpa/src/environment.rs +++ b/substrate/client/finality-grandpa/src/environment.rs @@ -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) => {