-
Notifications
You must be signed in to change notification settings - Fork 0
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
start documenting confirmation_status.rs #2
Conversation
@@ -16,9 +22,9 @@ fn u32_height_or_placeholder(option_blockheight: Option<BlockHeight>) -> u32 { | |||
#[derive(Clone, Copy, Debug, PartialEq)] | |||
pub enum ConfirmationStatus { | |||
Local, |
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 tried to think of other idents than "Local".. but I think in the end I decided I liked "Local" more than the alternatives I came up with.
@@ -29,13 +36,13 @@ impl ConfirmationStatus { | |||
pub fn is_confirmed(&self) -> bool { | |||
matches!(self, Self::ConfirmedOnChain(_)) | |||
} | |||
pub fn is_confirmed_after_or_at(&self, height: &BlockHeight) -> bool { | |||
pub fn is_confirmed_at_or_above(&self, height: &BlockHeight) -> bool { |
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's the rationale for having these predicates structured in this way? I kind of like the idea that if one's true that the other's false?
I renamed these using the height metaphor since that's consistent with the "BlockHeight" nym.
No description provided.