|
|
@ -3183,6 +3183,9 @@ void static ProcessGetData(CNode* pfrom) |
|
|
|
|
|
|
|
|
|
|
|
// Track requests for our stuff.
|
|
|
|
// Track requests for our stuff.
|
|
|
|
Inventory(inv.hash); |
|
|
|
Inventory(inv.hash); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK) |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3804,6 +3807,9 @@ bool ProcessMessages(CNode* pfrom) |
|
|
|
if (!pfrom->vRecvGetData.empty()) |
|
|
|
if (!pfrom->vRecvGetData.empty()) |
|
|
|
ProcessGetData(pfrom); |
|
|
|
ProcessGetData(pfrom); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this maintains the order of responses
|
|
|
|
|
|
|
|
if (!pfrom->vRecvGetData.empty()) return fOk; |
|
|
|
|
|
|
|
|
|
|
|
std::deque<CNetMessage>::iterator it = pfrom->vRecvMsg.begin(); |
|
|
|
std::deque<CNetMessage>::iterator it = pfrom->vRecvMsg.begin(); |
|
|
|
while (!pfrom->fDisconnect && it != pfrom->vRecvMsg.end()) { |
|
|
|
while (!pfrom->fDisconnect && it != pfrom->vRecvMsg.end()) { |
|
|
|
// Don't bother if send buffer is too full to respond anyway
|
|
|
|
// Don't bother if send buffer is too full to respond anyway
|
|
|
@ -3894,6 +3900,8 @@ bool ProcessMessages(CNode* pfrom) |
|
|
|
|
|
|
|
|
|
|
|
if (!fRet) |
|
|
|
if (!fRet) |
|
|
|
printf("ProcessMessage(%s, %u bytes) FAILED\n", strCommand.c_str(), nMessageSize); |
|
|
|
printf("ProcessMessage(%s, %u bytes) FAILED\n", strCommand.c_str(), nMessageSize); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// In case the connection got shut down, its receive buffer was wiped
|
|
|
|
// In case the connection got shut down, its receive buffer was wiped
|
|
|
|