HomePhabricator

[net processing] Split AlreadyHave() into separate block and tx functions

Description

[net processing] Split AlreadyHave() into separate block and tx functions

Summary:
Partial backport of core#19610:
https://github.com/bitcoin/bitcoin/pull/19610/commits/42ca5618cae0fd9ef97d2006b17d896bc58cc17c?diff=split&w=1

This will help narrowing the cs_main scope when introducing the proofs.
There are more simplifications and de-duplication to come in follow-up
backports.

Depends on D9501.

Note that the commit
https://github.com/bitcoin/bitcoin/pull/19610/commits/39f1dc944554218911b0945fff7e6d06f3dab284
is skipped because it is a segwit only commit.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9502

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Jul 30 2020, 09:30
FabienCommitted on May 12 2021, 19:01
FabienPushed on May 12 2021, 19:01
Reviewer
Restricted Project
Differential Revision
D9502: [net processing] Split AlreadyHave() into separate block and tx functions
Parents
rABC8f921089e9f5: p2p: add CInv block message helper methods
Branches
Unknown
Tags
Unknown