diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-12 10:13:51 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-12 10:14:05 +0100 |
commit | a8cbbdb07a5950720add08be3cf3b0865dc604e2 (patch) | |
tree | 0b98108fa26a7370fa610ede8a2759b7643d77fc | |
parent | 79313d2e2040451ef98a7a921c53f7736208c934 (diff) | |
parent | c4af7387634765d254d1432746385cf35917d367 (diff) |
Merge #12392: Fix ignoring tx data requests when fPauseSend is set on a peer
c4af738 Fix ignoring tx data requests when fPauseSend is set on a peer (Matt Corallo)
Pull request description:
This resolves a bug introduced in
66aa1d58a158991a8014a91335b5bc9c00062f56 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
-rw-r--r-- | src/net_processing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index fc0ba82d8b..bf9307727a 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1226,10 +1226,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); } } |