Page MenuHomePhabricator

[txpackages] add canonical way to get hash of package
ClosedPublic

Authored by Fabien on Jul 17 2024, 18:07.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC39a2132c1e7c: [txpackages] add canonical way to get hash of package
Summary

Partial backport of core#28970:
https://github.com/bitcoin/bitcoin/pull/28970/commits/092c978a42e8f4a02291b994713505ba8aac8b28

TxId sorting is correct, see D1527 (and comment in the test).
Since we use txid instead of wtxid + correct endianness in the comparison, the test is greatly simplified.

Note that we miss some backports that would allow to remove the type and version from the hasher/datastream, but there is no difference in behavior.

Depends on D16490.

Test Plan
ninja check-bitcoin-txpackage_tests