mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-01-31 18:40:58 +00:00
p2p: enforce cs_main lock when requesting headers
This commit is contained in:
parent
3e64e6f226
commit
cedbbeba96
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user