Skip to content

Commit 846eaae

Browse files
committed
Add benchmark for scheduleGrandpaChange extrinsic
1 parent 93b4e3b commit 846eaae

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pallets/admin-utils/src/benchmarking.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ mod benchmarks {
3333
_(RawOrigin::Root, value);
3434
}
3535

36+
#[benchmark]
37+
fn schedule_grandpa_change(a: Linear<0, 32>) {
38+
let next_authorities = (1..=a)
39+
.map(|idx| account("Authority", idx, 0u32))
40+
.collect::<Vec<(sp_consensus_grandpa::AuthorityId, u64)>>();
41+
let in_blocks = BlockNumberFor::<T>::from(42u32);
42+
43+
#[extrinsic_call]
44+
_(RawOrigin::Root, next_authorities, in_blocks, None);
45+
}
46+
3647
#[benchmark]
3748
fn sudo_set_default_take() {
3849
#[extrinsic_call]

0 commit comments

Comments
 (0)