Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/db.h
// Copyright (c) 2017-2019 The Bitcoin developers | // Copyright (c) 2017-2019 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_SEEDER_DB_H | #ifndef BITCOIN_SEEDER_DB_H | ||||
#define BITCOIN_SEEDER_DB_H | #define BITCOIN_SEEDER_DB_H | ||||
#include <chainparams.h> | |||||
#include <netbase.h> | #include <netbase.h> | ||||
#include <protocol.h> | #include <protocol.h> | ||||
#include <seeder/bitcoin.h> | #include <seeder/bitcoin.h> | ||||
#include <seeder/util.h> | #include <seeder/util.h> | ||||
#include <sync.h> | #include <sync.h> | ||||
#include <version.h> | #include <version.h> | ||||
#include <cmath> | #include <cmath> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <deque> | #include <deque> | ||||
#include <map> | #include <map> | ||||
#include <set> | #include <set> | ||||
#include <vector> | #include <vector> | ||||
#define MIN_RETRY 1000 | #define MIN_RETRY 1000 | ||||
#define REQUIRE_VERSION 70001 | #define REQUIRE_VERSION 70001 | ||||
static inline int GetRequireHeight(const bool testnet = fTestNet) { | static inline int GetRequireHeight() { | ||||
return testnet ? 500000 : 350000; | return Params().Checkpoints().mapCheckpoints.rbegin()->first; | ||||
} | } | ||||
static inline std::string ToString(const CService &ip) { | static inline std::string ToString(const CService &ip) { | ||||
std::string str = ip.ToString(); | std::string str = ip.ToString(); | ||||
while (str.size() < 22) { | while (str.size() < 22) { | ||||
str += ' '; | str += ' '; | ||||
} | } | ||||
return str; | return str; | ||||
▲ Show 20 Lines • Show All 447 Lines • Show Last 20 Lines |