Introduce EnsureOrigin::try_successul_origin (#11558)

* Introduce `EnsureOrigin::try_successul_origin`

* Formatting

* Fixes

* Add Morph

* Fixes

* Formatting
This commit is contained in:
Gavin Wood
2022-05-31 19:12:07 +01:00
committed by GitHub
parent adf0773f9d
commit 9107ae41fd
6 changed files with 221 additions and 97 deletions
+2 -2
View File
@@ -116,8 +116,8 @@ impl frame_support::traits::EnsureOrigin<Origin> for TestSpendOrigin {
})
}
#[cfg(feature = "runtime-benchmarks")]
fn successful_origin() -> Origin {
Origin::root()
fn try_successful_origin() -> Result<Origin, ()> {
Ok(Origin::root())
}
}