Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Runtime dispatch calls return Result #192

Merged
merged 18 commits into from
Jun 1, 2018
Merged

Runtime dispatch calls return Result #192

merged 18 commits into from
Jun 1, 2018

Conversation

gavofyork
Copy link
Member

@gavofyork gavofyork commented May 31, 2018

Goes in after #130

Closes #188

Makes usage cleaner, testing better and paves the way to easily getting rid of almost all panics in the runtime.

@gavofyork gavofyork added the A0-please_review Pull request needs code review. label May 31, 2018
@gavofyork gavofyork added this to the PoC-2 (Co-finalisation) milestone May 31, 2018
"Parachain heads update extrinsic must be at position {} in the block",
T::SET_POSITION
"Parachain heads update extrinsic must be at position {} in the block"
// , T::SET_POSITION
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left in for completeness, but given we're returning &'static str (for efficiency) and have no formatting tools (since it would severely bloat the runtime), I doubt there's much that can be done right now. A later PR could perhaps switch &'static str to String in the case of compiling to native and then it can be formatted properly.

$( $x )*
}
assert_eq!(h, runtime_io::storage_root());
macro_rules! assert_ok {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be just ?;, I know, but the code looks more uniform with this macro.

@gavofyork gavofyork mentioned this pull request Jun 1, 2018
16 tasks
@pepyakin
Copy link
Contributor

pepyakin commented Jun 1, 2018

There are some warnings related to this changeset:

https://travis-ci.org/paritytech/polkadot/builds/386366949#L691-L720

@gavofyork gavofyork merged commit 94087d7 into master Jun 1, 2018
@gavofyork gavofyork deleted the gav-result-dispatch branch June 1, 2018 16:33
@gavofyork gavofyork removed this from the PoC-2 (Co-finalisation) milestone Jun 21, 2018
JoshOrndorff added a commit to moonbeam-foundation/substrate that referenced this pull request Apr 21, 2021
* I think I found the issue.

* clean up

* unused variable

* Update pallets/author-inherent/src/lib.rs

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants