Skip to content

Commit

Permalink
Add new for DelayedOrigin (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjb0807 authored Nov 23, 2022
1 parent f336875 commit 56876b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions authority/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ pub struct DelayedOrigin<BlockNumber, PalletsOrigin> {
pub(crate) origin: Box<PalletsOrigin>,
}

#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))]
impl<BlockNumber, PalletsOrigin> DelayedOrigin<BlockNumber, PalletsOrigin> {
pub fn new(delay: BlockNumber, origin: Box<PalletsOrigin>) -> Self {
Self { delay, origin }
}
}

#[cfg(feature = "std")]
mod helper {
use std::cell::RefCell;
Expand Down

0 comments on commit 56876b4

Please sign in to comment.