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
grandpa: fix floor in report_equivocation weight calculation
  • Loading branch information
andresilva committed Aug 24, 2020
commit 02c7fef0a0cccfd4dc2f4933e71a5e30aadc2cac
2 changes: 1 addition & 1 deletion frame/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down