Skip to content

Commit

Permalink
Merge bitcoin#12392: Fix ignoring tx data requests when fPauseSend is…
Browse files Browse the repository at this point in the history
… set on a peer (dashpay#3225)

c4af738 Fix ignoring tx data requests when fPauseSend is set on a peer (Matt Corallo)

Pull request description:

  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).

  Probably worth slipping into 0.16 :/.

Tree-SHA512: a9313cef8ac6da31eb099c9925c8401a638220cf7bc9b7b7b83151ecae4b02630f2db45ef6668302b9bb0f38571afbd764993427f1ec9e4d74d9a3be6647d299
Signed-off-by: cevap <dev@i2pmail.org>
  • Loading branch information
codablock authored and cevap committed Apr 5, 2020
1 parent 00f82ab commit b0a9505
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net_processing.cpp
Expand Up @@ -1411,10 +1411,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) {
it++;
ProcessGetBlockData(pfrom, consensusParams, inv, connman, interruptMsgProc);
}
}
Expand Down

0 comments on commit b0a9505

Please sign in to comment.