mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Fix ignoring tx data requests when fPauseSend is set on a peer
This resolves a bug introduced in66aa1d58a1where, 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). Github-Pull: #12392 Rebased-From:c4af738763Tree-SHA512: d2f7707eb9f925a655f66e5e77ce406c5266f7b2feccd5bcdabf6d5bc27a3f6578e753fac83d9c8c3fd7cf7de6fee086eee2f95f77af99ea2c4e5ae77c322c58
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
d44cd7ed4b
commit
0f616517e1
@@ -1225,10 +1225,10 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
} // release cs_main
|
||||
|
||||
if (it != pfrom->vRecvGetData.end()) {
|
||||
if (it != pfrom->vRecvGetData.end() && !pfrom->fPauseSend) {
|
||||
const CInv &inv = *it;
|
||||
it++;
|
||||
if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK || inv.type == MSG_CMPCT_BLOCK || inv.type == MSG_WITNESS_BLOCK) {
|
||||
it++;
|
||||
ProcessGetBlockData(pfrom, consensusParams, inv, connman, interruptMsgProc);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user