Add WeightInfo to Babe and Grandpa Pallet (#7155)

* Add `WeightInfo` to Babe Pallet

* Also grandpa

* Update frame/grandpa/src/default_weights.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
Shawn Tabrizi
2020-09-21 15:31:44 +02:00
committed by GitHub
parent 0e843d260c
commit 42a4c2eef0
11 changed files with 138 additions and 81 deletions
+2 -2
View File
@@ -593,7 +593,7 @@ fn report_equivocation_has_valid_weight() {
// but there's a lower bound of 100 validators.
assert!(
(1..=100)
.map(weight_for::report_equivocation::<Test>)
.map(<Test as Trait>::WeightInfo::report_equivocation)
.collect::<Vec<_>>()
.windows(2)
.all(|w| w[0] == w[1])
@@ -603,7 +603,7 @@ fn report_equivocation_has_valid_weight() {
// with every extra validator.
assert!(
(100..=1000)
.map(weight_for::report_equivocation::<Test>)
.map(<Test as Trait>::WeightInfo::report_equivocation)
.collect::<Vec<_>>()
.windows(2)
.all(|w| w[0] < w[1])