0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-12 11:19:08 -05:00

[doc] comment fixups from n30110

This commit is contained in:
glozow 2024-10-30 21:13:01 -04:00
parent f07a533dfc
commit 917ab810d9
3 changed files with 6 additions and 3 deletions

View file

@ -134,7 +134,8 @@ public:
/** 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);

View file

@ -160,7 +160,9 @@ public:
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. */

View file

@ -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),