HomePhabricator

[net processing] Add IsBlockRequested() function

Description

[net processing] Add IsBlockRequested() function

Summary:
MarkBlockAsReceived() should not be used for both removing the block
from mapBlocksInFlight and checking whether it was in the map.

This is a partial backport of core#22141
https://github.com/bitcoin/bitcoin/pull/22141/commits/62993507336be06490b202b3955d4830a99e9e34

Depends on D12707

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, sdulfari

Reviewed By: #bitcoin_abc, sdulfari

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

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Jun 3 2021, 12:11
PiRKCommitted on Dec 1 2022, 07:46
PiRKPushed on Dec 1 2022, 07:46
Reviewer
Restricted Project
Differential Revision
D12708: [net processing] Add IsBlockRequested() function
Parents
rABC1a21825165b3: [net processing] Remove QueuedBlock.hash
Branches
Unknown
Tags
Unknown