Skip to content

Commit

Permalink
p2p: enforce cs_main lock when requesting headers
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklodder authored and xanimo committed Jul 9, 2024
1 parent e47041c commit 2793a65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ void Misbehaving(NodeId pnode, int howmuch)
// already requesting headers from, unless forced.
void RequestHeadersFrom(CNode* pto, CConnman& connman, const CBlockIndex* pindex, uint256 untilHash, bool fforceQuery)
{
AssertLockHeld(cs_main);
if (pto->nPendingHeaderRequests > 0) {
if (fforceQuery) {
LogPrint("net", "forcing getheaders request (%d) to peer=%d (%d open)\n",
Expand Down

0 comments on commit 2793a65

Please sign in to comment.