[#AddrMan-Add]
= xref:AddrMan.adoc[AddrMan]::Add
:relfileprefix: ../
:mrdocs:

Attempt to add one or more addresses to addrman&apos;s new table&period; If an address already exists in addrman, the existing entry may be updated (e&period;g&period; adding additional service flags)&period; If the existing entry is in the new table, it may be added to more buckets, improving the probability of selection&period;

== Synopsis

Declared in `&lt;addrman&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
Add(
    std::vector&lt;CAddress&gt; const& vAddr,
    xref:CNetAddr.adoc[CNetAddr] const& source,
    std::chrono::seconds time&lowbar;penalty = 0s);
----

== Return Value

true if at least one address is successfully added, or added to an additional bucket&period; Unaffected by updates&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *vAddr* [in]
| Address records to attempt to add&period;
| *source* [in]
| The address of the node that sent us these addr records&period;
| *time&lowbar;penalty* [in]
| A &quot;time penalty&quot; to apply to the address record&apos;s nTime&period; If a peer sends us an address record with nTime&equals;n, then we&apos;ll add it to our addrman with nTime&equals;(n &hyphen; time&lowbar;penalty)&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
