-
Notifications
You must be signed in to change notification settings - Fork 878
add some documentation clarifying the locktime ordering shenanigans in #1330 #1475
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 some documentation clarifying the locktime ordering shenanigans in #1330 #1475
Conversation
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.
Looks good, could you also mention lack of Ord
on LockTime
doc together with a on-phrase note that Transaction
uses consensus encoding?
f1dda2d
to
3131333
Compare
Done. |
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 3131333ca1732b92ecb47e72a36ba98309ad0b2d
bitcoin/CHANGELOG.md
Outdated
total ordering on locktimes will be forced to wrap this type. In `Transaction`, which | ||
contains a `LockTime` but is `Ord`, we have manually sorted the locktimes based on | ||
their consensus encoding. This ordering is somewhat arbitrary -- there is no total | ||
ordering on locktimes since they may be measured in either blocks or heights. |
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.
ordering on locktimes since they may be measured in either blocks or heights. | |
ordering on locktimes since they may be measured in either blocks or seconds. |
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.
Heh, oops, yep.
bitcoin/src/blockdata/transaction.rs
Outdated
@@ -580,6 +580,19 @@ impl<E> EncodeSigningDataResult<E> { | |||
/// | |||
/// We therefore deviate from the spec by always using the Segwit witness encoding | |||
/// for 0-input transactions, which results in unambiguously parseable transactions. | |||
/// |
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.
Trailing whitespace here.
3131333
to
02c1cd6
Compare
Fixed Tobin's comments. |
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 02c1cd6
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 02c1cd6
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 02c1cd6
Updates the CHANGELOG and also the doccomment on
Transaction
.