Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/bitcoin.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_BITCOIN_H | #ifndef BITCOIN_SEEDER_BITCOIN_H | ||||
#define BITCOIN_SEEDER_BITCOIN_H | #define BITCOIN_SEEDER_BITCOIN_H | ||||
#include <chainparams.h> | |||||
#include <protocol.h> | #include <protocol.h> | ||||
#include <streams.h> | #include <streams.h> | ||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
/** | static inline unsigned short GetDefaultPort() { | ||||
* The seeder do not use the Params facility. | return Params().GetDefaultPort(); | ||||
* | |||||
* While this is sorted out, we need a replacement. | |||||
*/ | |||||
extern bool fTestNet; | |||||
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet) { | |||||
return testnet ? 18333 : 8333; | |||||
} | } | ||||
// The network magic to use. | // The network magic to use. | ||||
extern CMessageHeader::MessageMagic netMagic; | extern CMessageHeader::MessageMagic netMagic; | ||||
class CSeederNode { | class CSeederNode { | ||||
private: | private: | ||||
SOCKET sock; | SOCKET sock; | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |