mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 14:45:12 +01:00
Remove unused GetTimeSeconds
This commit is contained in:
@@ -9,23 +9,26 @@
|
||||
|
||||
#include <chainparamsbase.h>
|
||||
#include <clientversion.h>
|
||||
#include <compat/stdin.h>
|
||||
#include <policy/feerate.h>
|
||||
#include <rpc/client.h>
|
||||
#include <rpc/mining.h>
|
||||
#include <rpc/protocol.h>
|
||||
#include <rpc/request.h>
|
||||
#include <tinyformat.h>
|
||||
#include <univalue.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
#include <util/translation.h>
|
||||
#include <util/url.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
@@ -37,8 +40,11 @@
|
||||
#include <event2/keyvalq_struct.h>
|
||||
#include <support/events.h>
|
||||
|
||||
#include <univalue.h>
|
||||
#include <compat/stdin.h>
|
||||
// The server returns time values from a mockable system clock, but it is not
|
||||
// trivial to get the mocked time from the server, nor is it needed for now, so
|
||||
// just use a plain system_clock.
|
||||
using CliClock = std::chrono::system_clock;
|
||||
using CliSeconds = std::chrono::time_point<CliClock, std::chrono::seconds>;
|
||||
|
||||
const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
|
||||
UrlDecodeFn* const URL_DECODE = urlDecode;
|
||||
@@ -433,7 +439,7 @@ private:
|
||||
if (conn_type == "addr-fetch") return "addr";
|
||||
return "";
|
||||
}
|
||||
const int64_t m_time_now{GetTimeSeconds()};
|
||||
const int64_t m_time_now{count_seconds(Now<CliSeconds>())};
|
||||
|
||||
public:
|
||||
static constexpr int ID_PEERINFO = 0;
|
||||
|
||||
Reference in New Issue
Block a user