Skip to content

Commit 3355026

Browse files
TheBlueMattfurszy
authored andcommitted
Fix ignoring tx data requests when fPauseSend is set on a peer
This resolves a bug introduced in 66aa1d5 where, if when responding to a series of transaction requests in a getdata we hit the send buffer limit and set fPauseSend, we will skip one transaction per call to ProcessGetData. Bug found by Cory Fields (@theuni).
1 parent 7caa108 commit 3355026

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,10 +1065,10 @@ void static ProcessGetData(CNode* pfrom, CConnman* connman, const std::atomic<bo
10651065
}
10661066
} // release cs_main
10671067

1068-
if (it != pfrom->vRecvGetData.end()) {
1068+
if (it != pfrom->vRecvGetData.end() && !pfrom->fPauseSend) {
10691069
const CInv &inv = *it;
1070-
it++;
10711070
if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK) {
1071+
it++;
10721072
ProcessGetBlockData(pfrom, inv, connman, interruptMsgProc);
10731073
}
10741074
}

0 commit comments

Comments
 (0)