-
Notifications
You must be signed in to change notification settings - Fork 115
substrate 2.0.0-rc4 version upgrade #1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
substrate 2.0.0-rc4 version upgrade #1072
Conversation
|
I think I will just leave this review to @shamil-gadelshin |
shamil-gadelshin
left a comment
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.
We don't have a strict rule for that but I recommend to comment all public methods or type definitions (for example in the storage definition): it could be done with temporary enabling this code line: #![warn(missing_docs)] .
Also, I like that for such a complex module it's very clean and understandable. Good work!
| frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} | ||
| system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} | ||
| sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} | ||
|
|
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.
Let's have a common format for dependencies: single line based similar to parity's format.
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.
Done 0e4cfb1
| sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} | ||
| sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} | ||
|
|
||
| [features] |
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.
Could you sort feature-definitions similar to dependencies order: it's easier to check them.
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.
Good point, 0e4cfb1
| std = [ | ||
| 'serde', | ||
| 'codec/std', | ||
| 'rstd/std', |
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.
Could you rename rstd to sp-std - similar to the new format in the 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.
Done 0e4cfb1
| @@ -1,40 +1,34 @@ | |||
| [package] | |||
| name = 'substrate-content-directory-module' | |||
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.
Please rename it to 'pallet-content-directory'.
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.
Done here 0e4cfb1
|
|
||
| /// Type, used in diffrent numeric constraints representations | ||
| type MaxNumber = u32; | ||
|
|
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.
If it's not too far out your current scope could you perform actual error conversion to the Substrate decl_error! macro?
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.
|
We don't have a strict rule for that but I recommend to comment all public methods or type definitions (for example in the storage definition): it could be done with temporary enabling this code line: #![warn(missing_docs)] . Thanks for pointing that feature. Added missing comments for the all public functions, traits and structure fields. |
shamil-gadelshin
left a comment
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.
LGTM. Nice work on error conversion!
This PR aims to upgrade content directory to substrate version 2.0.0-rc4
Closes: #1054
To minimize merge conflict potential, this PR assumes #1064 will be merged first.