Page MenuHomePhabricator

Move Hashers to util/hasher.{cpp/h}
ClosedPublic

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

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6a8b24f17db9: Move Hashers to util/hasher.{cpp/h}
Summary

Move the hashers that we use for hash tables to a common place.

Moved hashers:

  • SaltedTxidHasher
  • SaltedOutpointHasher
  • FilterHeaderHasher
  • SignatureCacheHasher
  • BlockHasher

Backport of core#19335 [1/3]
https://github.com/bitcoin/bitcoin/pull/19935/commits/95e61c1cf2a91d041c8025306ba36f0ea2806894

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Oct 5 2022, 07:32

I'm not sure if it is best to remove src/salteduint256hasher.[h|cpp] or keep it and include it in the new hasher.[h|cpp] source file.

For now, hasher.h does not seem to include too much stuff, so it is probably not a big impact to include it into files like peermanager.h.

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