diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-03-24 19:56:00 +0100 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-07-30 11:04:09 +0200 |
commit | fadd8b2676f6d68ec87189871461c9a6a6aa3cac (patch) | |
tree | cdb4586d8b54b58eea184a13fbe2d75ded74193c /src/rpc/net.cpp | |
parent | ab3db34836b157fe9a2196989a4d290c714bddc3 (diff) | |
download | bitcoin-fadd8b2676f6d68ec87189871461c9a6a6aa3cac.tar.xz |
addrman: Use system time instead of adjusted network time
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r-- | src/rpc/net.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 059be61bb4..e2d727e0a6 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -23,6 +23,7 @@ #include <timedata.h> #include <util/strencodings.h> #include <util/string.h> +#include <util/time.h> #include <util/translation.h> #include <validation.h> #include <version.h> @@ -942,7 +943,7 @@ static RPCHelpMan addpeeraddress() if (LookupHost(addr_string, net_addr, false)) { CAddress address{{net_addr, port}, ServiceFlags{NODE_NETWORK | NODE_WITNESS}}; - address.nTime = AdjustedTime(); + address.nTime = Now<NodeSeconds>(); // The source address is set equal to the address. This is equivalent to the peer // announcing itself. if (node.addrman->Add({address}, address)) { |