Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
babe: fix floor in report_equivocation weight calculation
Co-authored-by: Gavin Wood <[email protected]>
  • Loading branch information
andresilva and gavofyork authored Aug 24, 2020
commit f896f421bdc27929dec71e69c1f50d93dc8c5edc
2 changes: 1 addition & 1 deletion frame/babe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,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
Expand Down