diff options
| author | Pieter Wuille <[email protected]> | 2020-10-09 11:44:06 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2020-10-12 12:14:53 -0700 |
| commit | fd9a0060f028a4c01bd88f58777dea34bdcbafd1 (patch) | |
| tree | 6fc17dc1233aa9e4ab056b6a1d22046bf7ebd3a8 /src/net_processing.cpp | |
| parent | Delete limitedmap as it is unused now (diff) | |
| download | discoin-fd9a0060f028a4c01bd88f58777dea34bdcbafd1.tar.xz discoin-fd9a0060f028a4c01bd88f58777dea34bdcbafd1.zip | |
Report and verify expirations
Diffstat (limited to 'src/net_processing.cpp')
| -rw-r--r-- | src/net_processing.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 35c87127a..6c8affe70 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4488,7 +4488,13 @@ bool PeerManager::SendMessages(CNode* pto) // // Message: getdata (non-blocks) // - for (const GenTxid& gtxid : m_txrequest.GetRequestable(pto->GetId(), current_time)) { + std::vector<std::pair<NodeId, GenTxid>> expired; + auto requestable = m_txrequest.GetRequestable(pto->GetId(), current_time, &expired); + for (const auto& entry : expired) { + LogPrint(BCLog::NET, "timeout of inflight %s %s from peer=%d\n", entry.second.IsWtxid() ? "wtx" : "tx", + entry.second.GetHash().ToString(), entry.first); + } + for (const GenTxid& gtxid : requestable) { if (!AlreadyHaveTx(gtxid, m_mempool)) { LogPrint(BCLog::NET, "Requesting %s %s peer=%d\n", gtxid.IsWtxid() ? "wtx" : "tx", gtxid.GetHash().ToString(), pto->GetId()); |