You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PartiallySignedTransaction, psbt::Output and psbt::Input all lacking Eq implementation (but have PartialEq). Was this intentional?
If not, I see two ways forward with the implementation: adding derive or manual implementation doing BIP-174 serialization to a vector and byte-comparing those vectors.
The text was updated successfully, but these errors were encountered:
If not, I see two ways forward with the implementation: adding derive or manual implementation doing BIP-174 serialization to a vector and byte-comparing those vectors.
Same Psbts can have different serializations because the order in which we serialize keys is not defined. Even though the serialization in rust-bitcoin is deterministic, other implementations need not follow the same. I think we have to derive it on the Psbt data structure.
@apoelstra, I think we are on the same page. There were two ways to derive Eq.
[#derive(Eq)]
Compare the consensus encoding.
I suggested using [#derive(Eq)] because the same Psbt structures need to necessarily have the same consensus encoding(key-value pairs can be serialized in any order).
PartiallySignedTransaction
,psbt::Output
andpsbt::Input
all lackingEq
implementation (but havePartialEq
). Was this intentional?If not, I see two ways forward with the implementation: adding derive or manual implementation doing BIP-174 serialization to a vector and byte-comparing those vectors.
The text was updated successfully, but these errors were encountered: