addrman: Use system time instead of adjusted network time

This commit is contained in:
MarcoFalke
2022-03-24 19:56:00 +01:00
committed by MacroFake
parent ab3db34836
commit fadd8b2676
9 changed files with 28 additions and 29 deletions

View File

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