Page MenuHomePhabricator

[net processing] Remove CNodeState.nBlocksInFlightValidHeaders
ClosedPublic

Authored by PiRK on Nov 30 2022, 16:30.

Details

Summary

nBlocksInFlightValidHeaders always has the same value as nBlocksInFlight, since we only download
blocks with valid headers.

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

Depends on D12703

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Nov 30 2022, 16:30
src/net_processing.cpp
6933

Note for reviewers: this is because nBlocksInFlightValidHeaders is always incremented together with vBlocksInFlight, so state.vBlocksInFlight.size() > 0 implies state.nBlocksInFlightValidHeaders > 0

This revision is now accepted and ready to land.Nov 30 2022, 17:16