mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
allow to specify schedule time as a relative value (#6578)
* allow to specify schedule time as a relative value * bump version * line width * fix benchmarks * rename and updates
This commit is contained in:
@@ -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::DispatchTime},
|
||||
};
|
||||
use frame_system::{RawOrigin, Module as System, self, EventRecord};
|
||||
use sp_runtime::traits::{Bounded, One};
|
||||
@@ -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(),
|
||||
DispatchTime::At(1.into()),
|
||||
None,
|
||||
63,
|
||||
system::RawOrigin::Root.into(),
|
||||
|
||||
@@ -163,7 +163,7 @@ use frame_support::{
|
||||
weights::{Weight, DispatchClass},
|
||||
traits::{
|
||||
Currency, ReservableCurrency, LockableCurrency, WithdrawReason, LockIdentifier, Get,
|
||||
OnUnbalanced, BalanceStatus, schedule::Named as ScheduleNamed, EnsureOrigin
|
||||
OnUnbalanced, BalanceStatus, schedule::{Named as ScheduleNamed, DispatchTime}, EnsureOrigin
|
||||
},
|
||||
dispatch::DispatchResultWithPostInfo,
|
||||
};
|
||||
@@ -1688,7 +1688,7 @@ impl<T: Trait> Module<T> {
|
||||
|
||||
if T::Scheduler::schedule_named(
|
||||
(DEMOCRACY_ID, index).encode(),
|
||||
when,
|
||||
DispatchTime::At(when),
|
||||
None,
|
||||
63,
|
||||
system::RawOrigin::Root.into(),
|
||||
|
||||
Reference in New Issue
Block a user