aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-10-28 12:46:26 +0100
committerJohn Newbery <john@johnnewbery.com>2021-10-28 12:51:19 +0100
commite58598e833d5737900fe3c4369e26f2a08166892 (patch)
tree830b7c1529f3560a0417084f3660f6bbc877a6e6 /src/addrman.h
parentab25ef8c7f767258d5fe44f53b35ad8bd51ed5cd (diff)
downloadbitcoin-e58598e833d5737900fe3c4369e26f2a08166892.tar.xz
[addrman] Add doxygen comment to AddrMan::Add()
Does not document the return value since we're going to fix the semantics in a future commit.
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 174ab4f811..1fbc827183 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -69,7 +69,14 @@ public:
//! Return the number of (unique) addresses in all tables.
size_t size() const;
- //! Add addresses to addrman's new table.
+ /**
+ * Attempt to add one or more addresses to addrman's new table.
+ *
+ * @param[in] vAddr Address records to attempt to add.
+ * @param[in] source The address of the node that sent us these addr records.
+ * @param[in] nTimePenalty A "time penalty" to apply to the address record's nTime. If a peer
+ * sends us an address record with nTime=n, then we'll add it to our
+ * addrman with nTime=(n - nTimePenalty). */
bool Add(const std::vector<CAddress>& vAddr, const CNetAddr& source, int64_t nTimePenalty = 0);
//! Mark an entry as accessible, possibly moving it from "new" to "tried".