Page MenuHomePhabricator

Add generic SaltedSipHasher
ClosedPublic

Authored by PiRK on Oct 5 2022, 07:33.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC4ad7cf9f6e27: Add generic SaltedSipHasher
Summary

SaltedSipHasher is a generic hasher that can be used with most things we
would hash in an unordered container.

Replace KeyIDHasher with SaltedSipHasher and remove now unused KeyIDHasher

Also remove an outdated comment which is no longer relevant since std::unordered_map is used instead of boost::unordered_map in CCoinsMap

This concludes backport of core#19935 and core#22772

https://github.com/bitcoin/bitcoin/pull/19935/commits/210b693db66e7c5b618014b5a287aee15af00045
https://github.com/bitcoin/bitcoin/pull/19935/commits/281fd1a4a032cded7f9ea9857e3e99fc793c714b
https://github.com/bitcoin/bitcoin/pull/22772/commits/16652a93ea6d25674fe318ef5e213e98427c8947
https://github.com/bitcoin/bitcoin/pull/22772/commits/4c69571e6eeae2c03d59045ea102baa5fd1c3816

Depends on D12149

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Oct 5 2022, 07:33
Fabien requested changes to this revision.Oct 5 2022, 08:20
Fabien added a subscriber: Fabien.

The code looks good, but can you update the summary:

  • To fix the commit hashes
  • To mention the PR that removes KeyIDHasher, as it's not in the source material
This revision now requires changes to proceed.Oct 5 2022, 08:20
PiRK edited the summary of this revision. (Show Details)
PiRK removed a reviewer: Fabien.

fix a commit url, and also backport core#22772 (follow-ups, including removal of unused KeyIDHasher)

This revision is now accepted and ready to land.Oct 5 2022, 14:43
This revision was automatically updated to reflect the committed changes.