Skip to content

Commit

Permalink
[doc] comment fixups from n30110
Browse files Browse the repository at this point in the history
  • Loading branch information
glozow committed Oct 31, 2024
1 parent f07a533 commit 917ab81
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/node/txdownloadman.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ class TxDownloadManager {
/** Deletes all txrequest announcements and orphans for a given peer. */
void DisconnectedPeer(NodeId nodeid);

/** New inv has been received. May be added as a candidate to txrequest.
/** Consider adding this tx hash to txrequest. Should be called whenever a new inv has been received.
* Also called internally when a transaction is missing parents so that we can request them.
* @param[in] p2p_inv When true, only add this announcement if we don't already have the tx.
* Returns true if this was a dropped inv (p2p_inv=true and we already have the tx), false otherwise. */
bool AddTxAnnouncement(NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now, bool p2p_inv);
Expand Down
4 changes: 3 additions & 1 deletion src/node/txdownloadman_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ class TxDownloadManagerImpl {
void ConnectedPeer(NodeId nodeid, const TxDownloadConnectionInfo& info);
void DisconnectedPeer(NodeId nodeid);

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

/** Get getdata requests to send. */
Expand Down
2 changes: 1 addition & 1 deletion src/test/txdownload_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct Behaviors {
bool m_ignore_inv_txid;
bool m_ignore_inv_wtxid;

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

0 comments on commit 917ab81

Please sign in to comment.