Skip to content
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

Closed

Conversation

zancas
Copy link

@zancas zancas commented Nov 15, 2023

No description provided.

@@ -16,9 +22,9 @@ fn u32_height_or_placeholder(option_blockheight: Option<BlockHeight>) -> u32 {
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ConfirmationStatus {
Local,
Copy link
Author

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 {
Copy link
Author

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.

@zancas zancas closed this Jan 17, 2024
@zancas zancas deleted the confirmation_enum branch May 30, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant