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

Add standard constants to lock times #1574

Merged
merged 1 commit into from Jan 30, 2023

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Jan 22, 2023

Some of the lock time structs (Height, Time ect.) are missing standard constants for min, max ect.

Add standard constants taking into consideration the various locktime corner cases.

Add max_value and min_value to be consistent with Rust 1.41.1 (incl. Sequence).

Fix: #1451

This PR is not complex in itself but locktimes are notoriously complex, please wait for 3 acks before merging - and ack'ing makes no guarantee that reviewer got all corner cases :)

There is no rush on this one, apoelstra, Kixunil, sanket1729 please just review when your brain is fresh.

Kixunil
Kixunil previously approved these changes Jan 22, 2023
Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 72b60c3

@Kixunil
Copy link
Collaborator

Kixunil commented Jan 22, 2023

I don't think it's that complex but I don't mind being a bit more careful. This is unlikely to conflict anyway.

@tcharding
Copy link
Member Author

Perhaps "hash many edge cases" is better than "notoriously complex" :)

@apoelstra
Copy link
Member

Looks good to me! Will ACK shortly.

I agree it's not terribly complex but I do think it's reasonable to demand 3 ACKs for anything touching locktimes. cc @sanket1729 can you review this one?

apoelstra
apoelstra previously approved these changes Jan 23, 2023
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 72b60c3

sanket1729
sanket1729 previously approved these changes Jan 23, 2023
Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 72b60c3

@apoelstra
Copy link
Member

Needs rebase after #1575.

Some of the lock time structs (`Height`, `Time` ect.) are missing
standard constants for min, max ect.

Add standard constants taking into consideration the various locktime
corner cases.

Add `max_value` and `min_value` to be consistent with Rust 1.41.1 (incl.
`Sequence`).

Fix: rust-bitcoin#1451
@tcharding
Copy link
Member Author

Rebase only, no other changes.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3c0598b

Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3c0598b

@apoelstra apoelstra merged commit 4ad0c63 into rust-bitcoin:master Jan 30, 2023
@tcharding tcharding deleted the 01-22-max branch January 31, 2023 22:21
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.

Both relative and absolute Height and Time are missing standard constants
4 participants