-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add comment for clear_unconfirmed_slot() in blockstore.rs #21837
Add comment for clear_unconfirmed_slot() in blockstore.rs #21837
Conversation
ledger/src/blockstore.rs
Outdated
@@ -967,6 +967,18 @@ impl Blockstore { | |||
Ok((newly_completed_data_sets, inserted_indices)) | |||
} | |||
|
|||
/** | |||
* Range-delete all entries which prefix matches the specified slot and | |||
* clear all the related metadata except its next_slots. |
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 would specify metadata in the SlotMeta
struct, since the other column being deleted families are also technically metadata
Pull request has been modified.
I think you should use
over
for at least for There aren't any in this PR, but for the other PR's that use solana/test-validator/src/lib.rs Line 254 in 5a28f61
Here's the Rust documentation on this too: |
Codecov Report
@@ Coverage Diff @@
## master #21837 +/- ##
=========================================
- Coverage 81.3% 81.3% -0.1%
=========================================
Files 516 516
Lines 144217 144217
=========================================
- Hits 117268 117251 -17
- Misses 26949 26966 +17 |
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.
The content looks good to me; just the formatting changes to make it match Rust convention please !
Thanks for the useful reference, @steviez. I will fix all the styles before merging the PRs.
I was referring to the rust comment style mentioned here: https://doc.rust-lang.org/reference/comments.html, where it says:
Since the comment is a block comment describing a function, I think it's probably better to use Btw, can I know how I can compile/find the document into an html file so that I can see how it looks like? |
Nice, I actually hadn't seen this before so thanks for sharing!
I don't have a strong preference one way or the other. It looks like core rust libraries use
The directions at the README here are for building the docs at https://docs.solana.com/ |
Definitely! I am just double-checking on what is the mostly-used style in Rust. This is a great reference! I will follow the style here. |
Pull request has been modified.
Summary of Changes
Add comment block for clear_unconfirmed_slot() in blockstore.rs
explaining what it does and which column family it modifies.