mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
babe: fix report_equivocation weight (#6936)
* babe: fix report_equivocation weight * node: bump spec_version * babe: fix floor in report_equivocation weight calculation Co-authored-by: Gavin Wood <gavin@parity.io> * grandpa: fix floor in report_equivocation weight calculation * babe, grandpa: add test for weight_for::report_equivocation Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
@@ -376,7 +376,7 @@ mod weight_for {
|
||||
pub fn report_equivocation<T: super::Trait>(validator_count: u32) -> Weight {
|
||||
// we take the validator set count from the membership proof to
|
||||
// calculate the weight but we set a floor of 100 validators.
|
||||
let validator_count = validator_count.min(100) as u64;
|
||||
let validator_count = validator_count.max(100) as u64;
|
||||
|
||||
// worst case we are considering is that the given offender
|
||||
// is backed by 200 nominators
|
||||
|
||||
Reference in New Issue
Block a user