Skip to content

Commit 917ab81

Browse files
committed
[doc] comment fixups from n30110
1 parent f07a533 commit 917ab81

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/node/txdownloadman.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ class TxDownloadManager {
134134
/** Deletes all txrequest announcements and orphans for a given peer. */
135135
void DisconnectedPeer(NodeId nodeid);
136136

137-
/** New inv has been received. May be added as a candidate to txrequest.
137+
/** Consider adding this tx hash to txrequest. Should be called whenever a new inv has been received.
138+
* Also called internally when a transaction is missing parents so that we can request them.
138139
* @param[in] p2p_inv When true, only add this announcement if we don't already have the tx.
139140
* Returns true if this was a dropped inv (p2p_inv=true and we already have the tx), false otherwise. */
140141
bool AddTxAnnouncement(NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now, bool p2p_inv);

src/node/txdownloadman_impl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ class TxDownloadManagerImpl {
160160
void ConnectedPeer(NodeId nodeid, const TxDownloadConnectionInfo& info);
161161
void DisconnectedPeer(NodeId nodeid);
162162

163-
/** New inv has been received. May be added as a candidate to txrequest. */
163+
/** Consider adding this tx hash to txrequest. Should be called whenever a new inv has been received.
164+
* Also called internally when a transaction is missing parents so that we can request them.
165+
*/
164166
bool AddTxAnnouncement(NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now, bool p2p_inv);
165167

166168
/** Get getdata requests to send. */

src/test/txdownload_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct Behaviors {
2727
bool m_ignore_inv_txid;
2828
bool m_ignore_inv_wtxid;
2929

30-
// Constructor. We are passing and casting ints because they are more readable in a table (see all_expected_results).
30+
// Constructor. We are passing and casting ints because they are more readable in a table (see expected_behaviors).
3131
Behaviors(bool txid_rejects, bool wtxid_rejects, bool txid_recon, bool wtxid_recon, bool keep, bool txid_inv, bool wtxid_inv) :
3232
m_txid_in_rejects(txid_rejects),
3333
m_wtxid_in_rejects(wtxid_rejects),

0 commit comments

Comments
 (0)