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

Rewrite impl_runtime_apis! and decl_runtime_apis! as proc-macro#1174

Merged
gavofyork merged 26 commits intomasterfrom
bkchr-runtime-api-v3
Nov 30, 2018
Merged

Rewrite impl_runtime_apis! and decl_runtime_apis! as proc-macro#1174
gavofyork merged 26 commits intomasterfrom
bkchr-runtime-api-v3

Conversation

@bkchr
Copy link
Copy Markdown
Member

@bkchr bkchr commented Nov 28, 2018

This is a complete rewrite of both macros as proc-macros.
Using proc-macro brings us certain advantages, like better error reporting and a more readable implementation.

@bkchr bkchr requested a review from gavofyork November 28, 2018 16:30
@rphmeier rphmeier added the A0-please_review Pull request needs code review. label Nov 28, 2018
Copy link
Copy Markdown
Contributor

@gnunicorn gnunicorn left a comment

Choose a reason for hiding this comment

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

Great Work. It is pretty mind-bending to review in between, but it looks pretty sound to me. Just some minor changes requested.

fn inherent_extrinsics(data: runtime_primitives::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
let mut inherent = Vec::new();

inherent.extend(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

manual amalgamation code?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I reverted in parts my macro here. I ran into some problems. As I will need to revisit the InherentData stuff anyway, I did not wanted to waste too much time on this topic in this pr.

@gavofyork gavofyork merged commit 5651ac7 into master Nov 30, 2018
@gavofyork gavofyork deleted the bkchr-runtime-api-v3 branch November 30, 2018 10:42
liuchengxu pushed a commit to liuchengxu/substrate that referenced this pull request May 31, 2023
Temporary banning for unreachable peers
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.

4 participants