diff --git a/substrate/core/finality-grandpa/src/lib.rs b/substrate/core/finality-grandpa/src/lib.rs index d00c94cdbf..c14dc96dc2 100644 --- a/substrate/core/finality-grandpa/src/lib.rs +++ b/substrate/core/finality-grandpa/src/lib.rs @@ -415,6 +415,14 @@ impl, B, E, N, RA> grandpa::Chain Option<(Block::Hash, NumberFor)> { + // NOTE: when we finalize an authority set change through the sync protocol the voter is + // signalled asynchronously. therefore the voter could still vote in the next round + // before activating the new set. the `authority_set` is updated immediately thus we + // restrict the voter based on that. + if self.set_id != self.authority_set.inner().read().current().0 { + return None; + } + // we refuse to vote beyond the current limit number where transitions are scheduled to // occur. // once blocks are finalized that make that transition irrelevant or activate it,