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.
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_weightthat allows Root origin to override the weight of any function call.