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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Nov 30 2022, 16:30
src/net_processing.cpp
6933 ↗(On Diff #36834)

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