aboutsummaryrefslogtreecommitdiff
path: root/src/txrequest.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-10-09 11:44:06 -0700
committerPieter Wuille <pieter@wuille.net>2020-10-12 12:14:53 -0700
commitfd9a0060f028a4c01bd88f58777dea34bdcbafd1 (patch)
tree6fc17dc1233aa9e4ab056b6a1d22046bf7ebd3a8 /src/txrequest.h
parent86f50ed10f66b5535f0162cf0026456a9e3f8963 (diff)
downloadbitcoin-fd9a0060f028a4c01bd88f58777dea34bdcbafd1.tar.xz
Report and verify expirations
Diffstat (limited to 'src/txrequest.h')
-rw-r--r--src/txrequest.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/txrequest.h b/src/txrequest.h
index a434901a52..cd3042c87e 100644
--- a/src/txrequest.h
+++ b/src/txrequest.h
@@ -148,6 +148,7 @@ public:
*
* It does the following:
* - Convert all REQUESTED announcements (for all txhashes/peers) with (expiry <= now) to COMPLETED ones.
+ * These are returned in expired, if non-nullptr.
* - Requestable announcements are selected: CANDIDATE announcements from the specified peer with
* (reqtime <= now) for which no existing REQUESTED announcement with the same txhash from a different peer
* exists, and for which the specified peer is the best choice among all (reqtime <= now) CANDIDATE
@@ -159,7 +160,8 @@ public:
* out of order: if multiple dependent transactions are announced simultaneously by one peer, and end up
* being requested from them, the requests will happen in announcement order.
*/
- std::vector<GenTxid> GetRequestable(NodeId peer, std::chrono::microseconds now);
+ std::vector<GenTxid> GetRequestable(NodeId peer, std::chrono::microseconds now,
+ std::vector<std::pair<NodeId, GenTxid>>* expired = nullptr);
/** Marks a transaction as requested, with a specified expiry.
*