From 0ef342d6b1ae6c0e55f5fbce29a32fa1dba1f881 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Wed, 23 Nov 2022 07:33:42 +0800 Subject: [PATCH] Add new for DelayedOrigin --- authority/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/authority/src/lib.rs b/authority/src/lib.rs index 93a30dac6..c140b6f15 100644 --- a/authority/src/lib.rs +++ b/authority/src/lib.rs @@ -61,6 +61,13 @@ pub struct DelayedOrigin { pub(crate) origin: Box, } +#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))] +impl DelayedOrigin { + pub fn new(delay: BlockNumber, origin: Box) -> Self { + Self { delay, origin } + } +} + #[cfg(feature = "std")] mod helper { use std::cell::RefCell;