Reduce call size of Referenda pallet (#11578)

* Reduce call size of Referenda pallet

* Fixes

* Fixes

* Fixes

* Docs
This commit is contained in:
Gavin Wood
2022-06-02 12:41:05 +01:00
committed by GitHub
parent ba96e8a8f4
commit 58d23ef97b
5 changed files with 61 additions and 20 deletions
+2 -2
View File
@@ -310,7 +310,7 @@ pub fn set_balance_proposal_hash(value: u64) -> H256 {
pub fn propose_set_balance(who: u64, value: u64, delay: u64) -> DispatchResult {
Referenda::submit(
Origin::signed(who),
frame_system::RawOrigin::Root.into(),
Box::new(frame_system::RawOrigin::Root.into()),
set_balance_proposal_hash(value),
DispatchTime::After(delay),
)
@@ -438,7 +438,7 @@ impl RefState {
pub fn create(self) -> ReferendumIndex {
assert_ok!(Referenda::submit(
Origin::signed(1),
frame_support::dispatch::RawOrigin::Root.into(),
Box::new(frame_support::dispatch::RawOrigin::Root.into()),
set_balance_proposal_hash(1),
DispatchTime::At(10),
));