-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Governance 2 (Part 1, Non-Controversial Changes) #5892
Conversation
// Copyright 2022 Parity Technologies (UK) Ltd. | ||
// This file is part of Polkadot. | ||
|
||
// Polkadot is free software: you can redistribute it and/or modify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is exactly copy and paste from the existing runtime configuration.
@@ -253,8 +253,8 @@ where | |||
} | |||
|
|||
#[cfg(feature = "runtime-benchmarks")] | |||
fn successful_origin() -> Origin { | |||
Origin::root() | |||
fn try_successful_origin() -> Result<Origin, ()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this renamed in substrate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
for i in 0 .. max_people { | ||
let leaser = account("lease_deposit", i, 0); | ||
assert_eq!(T::Currency::reserved_balance(&leaser), T::Currency::minimum_balance()); | ||
} | ||
|
||
}: _(RawOrigin::Root, para) | ||
let origin = T::ForceOrigin::successful_origin(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it is again without try?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is try_successful_origin
and successful_origin
, which is automatically implemented as try_successful_origin().unwrap()
.
In this case, we need the successful origin
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
bot merge |
* master: (23 commits) Bump futures-util from 0.3.21 to 0.3.23 (#5922) Companion for 12095 (#5924) use generated preimage weight (#5904) Update Substrate to make companion check happy (#5934) Fix wrong logic. (#5931) update weights (#5911) Clean up MigrateToV10 (#5921) Bump async-trait from 0.1.56 to 0.1.57 (#5919) Send back empty votes + log in approval-voting in case candidate entry is missing. (#5925) chore: bump zombienet version (#5914) Bump indexmap from 1.9.0 to 1.9.1 (#5918) Bump proc-macro2 from 1.0.40 to 1.0.43 (#5878) Bump hyper from 0.14.19 to 0.14.20 (#5901) Fix output file for updating weights in run_benches_for_runtime.sh (#5906) Companion to Substrate PR 12006 (#5913) pin gha versions (#5916) Companion for new Trie cache (#5897) [ci] Add check-runtime-migration job (#5891) Governance 2 (Part 1, Non-Controversial Changes) (#5892) Added Dwellir bootnodes for Kusama and Polkadot (#5772) ...
Breaking apart some of the changes from: #5205
These should be all non-controversial changes, and refactors the exact governance changes from master, making it easier to audit the changes from the #5205.