mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Report and verify expirations
This commit is contained in:
parent
86f50ed10f
commit
fd9a0060f0
6 changed files with 64 additions and 13 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue