-
Notifications
You must be signed in to change notification settings - Fork 153
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
Apply Blocks and refactor #374
Conversation
self.blocks | ||
} | ||
// TODO: conversions from full to regular tipset should not return a result | ||
// and should be validated on creation instead |
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.
What validations should be checked? The tipset constructor has validation checks included but curious what other validation would be required?
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 Tipset
does yeah, but the FullTipset
is sometimes constructed without validation (why the conversion to Tipset is error prone
ipld/blockstore/src/buffered.rs
Outdated
use std::error::Error as StdError; | ||
|
||
/// Wrapper around `BlockStore` to limit and have control over when values are written. | ||
/// This type is not threadsafe and can only be used in syncronous contexts. |
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.
TYPO: synchronous
ipld/blockstore/src/buffered.rs
Outdated
|
||
impl<'bs, BS> BufferedBlockStore<'bs, BS> | ||
where | ||
BS: BlockStore + Store, |
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.
Curious what are the consequences of removing the requirement of Store on BS, since BlockStore inherets the Store trait... I removed it and it works.
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.
functionally the same, but yeah should be more succinct, I'll fix
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.
Cool. Just wanted to make sure i was on the same page. But yeah, removing is best
Summary of changes
Changes introduced in this pull request:
Refactor and cleanup:
Reference issue to close (if applicable)
Closes
#363
Other information and links