-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
) -> DispatchResult { | ||
ensure_root(origin)?; | ||
let res = call.dispatch_bypass_filter(frame_system::RawOrigin::Root.into()); | ||
res.map(|_| ()).map_err(|e| e.error) |
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.
Other functions similar to this emit an event with the result, swallow the result, and just return Ok(())
. I think now that we have storage layer by default, we can simply return the result, which I have opted for here.
Why add this if |
Because you don't have the sudo pallet on production networks after the initial phase. |
Should the |
I can imagine runtimes where you only have sudo, but not
This call can never be called directly. It requires that you are |
I see. So, the |
Yes it can only be called by the |
* add with weight extrinsic * improve test
* add with weight extrinsic * improve test
This adds a new utility function
with_weight
that allows Root origin to override the weight of any function call.