-
Notifications
You must be signed in to change notification settings - Fork 305
Impl Ord and PartialOrd for RecoverableSignature #611
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
Impl Ord and PartialOrd for RecoverableSignature #611
Conversation
|
Do you need the ordering to be consistent between LE and BE machines? If so, you probably need to serialize them before comparing, |
Yeah that'd be ideal. How do I do that? |
See for example what we did with the regular signatures: https://github.com/rust-bitcoin/rust-secp256k1/blob/master/secp256k1-sys/src/lib.rs#L278-L286 That's in secp256k1-sys, the FFI lib. Then in the main library you can just |
1a2dc35 to
dbc5465
Compare
|
@apoelstra sorry never got to this, but looks like they already exist
|
|
@benthecarman did you mean to close the PR? |
|
@Kixunil no, it should be merged :). This PR is about deriving the ordering traits on the rust-secp repo. I had said that we couldn't derive these since it would pass thorugh to the rust-secp-sys ordering traits, which were implementation defined. But actually they aren't implementation-defined and there is no problem. |
apoelstra
left a comment
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 dbc5465 oops, sorry!
|
Oh, I thought this one does the same thing as the linked code but the linked is on |
…coverableSignature
dbc546596f4c7b2d4d1e489aa7e91775eaf54bb0 Impl Ord and PartialOrd for RecoverableSignature (benthecarman)
Pull request description:
ACKs for top commit:
apoelstra:
ACK dbc546596f4c7b2d4d1e489aa7e91775eaf54bb0 oops, sorry!
Tree-SHA512: decda6b6e7a4929147f5ca00cb2802037c6a297aa816c253e181f1a85ec9e46958469b9d481e2b4aba2c6d86def80bba33a62c507459d82c86cfed4271a23eea
…coverableSignature
dbc546596f4c7b2d4d1e489aa7e91775eaf54bb0 Impl Ord and PartialOrd for RecoverableSignature (benthecarman)
Pull request description:
ACKs for top commit:
apoelstra:
ACK dbc546596f4c7b2d4d1e489aa7e91775eaf54bb0 oops, sorry!
Tree-SHA512: decda6b6e7a4929147f5ca00cb2802037c6a297aa816c253e181f1a85ec9e46958469b9d481e2b4aba2c6d86def80bba33a62c507459d82c86cfed4271a23eea
No description provided.