Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fix benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Jul 6, 2020
1 parent 301f28a commit 5ba6d9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frame/democracy/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use super::*;
use frame_benchmarking::{benchmarks, account};
use frame_support::{
IterableStorageMap,
traits::{Currency, Get, EnsureOrigin, OnInitialize, UnfilteredDispatchable},
traits::{Currency, Get, EnsureOrigin, OnInitialize, UnfilteredDispatchable, schedule::DelayedDispatchTime},
};
use frame_system::{RawOrigin, Module as System, self, EventRecord};
use sp_runtime::traits::{Bounded, One};
Expand Down Expand Up @@ -76,7 +76,7 @@ fn add_referendum<T: Trait>(n: u32) -> Result<ReferendumIndex, &'static str> {
let referendum_index: ReferendumIndex = ReferendumCount::get() - 1;
T::Scheduler::schedule_named(
(DEMOCRACY_ID, referendum_index).encode(),
1.into(),
DelayedDispatchTime::At(1.into()),
None,
63,
system::RawOrigin::Root.into(),
Expand Down
2 changes: 1 addition & 1 deletion frame/scheduler/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn fill_schedule<T: Trait> (when: T::BlockNumber, n: u32) -> Result<(), &'static
// Named schedule is strictly heavier than anonymous
Scheduler::<T>::do_schedule_named(
i.encode(),
when,
DelayedDispatchTime::At(when),
// Add periodicity
Some((T::BlockNumber::one(), 100)),
// HARD_DEADLINE priority means it gets executed no matter what
Expand Down

0 comments on commit 5ba6d9c

Please sign in to comment.