-
Notifications
You must be signed in to change notification settings - Fork 244
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
Refine documentation for subspace-core-primitives #85
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liuchengxu
requested review from
nazar-pc,
ozgunozerk and
rg3l3dr
as code owners
October 27, 2021 02:15
liuchengxu
changed the title
Refine rustdoc 0
Refine documentation for subspace-core-primitives
Oct 27, 2021
liuchengxu
commented
Oct 27, 2021
liuchengxu
commented
Oct 27, 2021
liuchengxu
commented
Oct 27, 2021
nazar-pc
reviewed
Oct 27, 2021
nazar-pc
reviewed
Oct 27, 2021
liuchengxu
force-pushed
the
refine-rustdoc-0
branch
2 times, most recently
from
October 28, 2021 02:15
96ca9c5
to
fb920e6
Compare
So that we can make use of `force-debug` feature in the future, ref substrate-developer-hub/substrate-docs#355
`merkle_tree_root` does not give much useful information, here `record_root` is the merkle root of records of a semgent, just like `tx_root` is the merkle root of transactions of a block.
runtime normally does not need the serde feature, which increases the compiled wasm size(even unnoticble). The serde is compiled under `std` by default, so the farmer can still access it without any pain.
Make it consistent with `extrinsics_root`.
liuchengxu
force-pushed
the
refine-rustdoc-0
branch
from
October 28, 2021 10:05
fb920e6
to
52cc5be
Compare
nazar-pc
reviewed
Oct 28, 2021
Comment on lines
+113
to
+126
/// Returns the number of partially archived bytes for a block. | ||
pub fn partial_archived(&self) -> Option<u32> { | ||
self.archived_progress.partial() | ||
} | ||
|
||
/// Sets new number of partially archived bytes. | ||
pub fn set_partial_archived(&mut self, new_partial: u32) { | ||
self.archived_progress.set_partial(new_partial); | ||
} | ||
|
||
/// Sets the archived state of this block to [`ArchivedBlockProgress::Complete`]. | ||
pub fn set_complete(&mut self) { | ||
self.archived_progress = ArchivedBlockProgress::Complete; | ||
} |
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.
I'm not sure these methods and methods on ArchivedBlockProgress
are super useful, it feels like it might have been easier to work with the data types directly (considering that all of their fields are public anyway.
nazar-pc
approved these changes
Oct 28, 2021
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #80
This PR mainly takes care of
subspace-core-primitives
, reviewing by each commit should make more sense, I'm open to all suggestions as my current understanding of the big picture can be limited. The Object related concepts will be revisited later.