-
Notifications
You must be signed in to change notification settings - Fork 831
Add methods for pushing locktimes #1629
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
Conversation
Regarding naming, to avoid people thinking these push opcodes as well, I suggest calling them |
b7c5678
to
926e945
Compare
Used the new names as suggested. |
https://doc.rust-lang.org/std/primitive.i64.html#impl-From%3Cu32%3E-for-i64 suggests that |
self.push_int(u32::from(sequence) as i64) Works but is not any better. |
|
|
Ha ha, I'm a wombat, the whole time it was the |
926e945
to
e106f4f
Compare
Removed usage of |
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.
ACK e106f4f29d47ce12299dff7a6c9476355b1f3e58
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.
ACK e106f4f29d47ce12299dff7a6c9476355b1f3e58
Lock times are u32 and can necessitate encoding using 5 bytes. As such they are "special". Add methods `push_lock_time` and `push_sequence` for pushing absolute lock times and sequence numbers. We do not push relative locktimes because they are only 16 bits from the original sequence number.
e106f4f
to
1e0e712
Compare
No changes since acks, just rebased to pick up a recently merged commit and re-wrote the PR description. |
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.
ACK 1e0e712
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.
ACK 1e0e712
Lock times are
u32
and can require encoding using 5 bytes.Add methods
push_lock_time
andpush_sequence
for pushing absolute lock times and sequence numbers. We do not push relative locktimes because they are only 16 bits from the original sequence number.