mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 12:11:02 +00:00
grandpa: store the authority id that is used for voting per round (#7454)
* grandpa: store the authority id that is used for voting per round * grandpa: fix tests
This commit is contained in:
@@ -252,6 +252,14 @@ impl<H, N> Equivocation<H, N> {
|
||||
Equivocation::Precommit(ref equivocation) => &equivocation.identity,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the round number when the equivocation happened.
|
||||
pub fn round_number(&self) -> RoundNumber {
|
||||
match self {
|
||||
Equivocation::Prevote(ref equivocation) => equivocation.round_number,
|
||||
Equivocation::Precommit(ref equivocation) => equivocation.round_number,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Verifies the equivocation proof by making sure that both votes target
|
||||
|
||||
Reference in New Issue
Block a user