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 <util/system.h> | |||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
/** | static inline unsigned short GetDefaultPort() { | ||||
* The seeder do not use the Params facility. | std::string chain = gArgs.GetChainName(); | ||||
* | if (chain == CBaseChainParams::MAIN) { | ||||
* While this is sorted out, we need a replacement. | return 8333; | ||||
*/ | } else if (chain == CBaseChainParams::TESTNET) { | ||||
extern bool fTestNet; | return 18333; | ||||
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet) { | } else { | ||||
return testnet ? 18333 : 8333; | // regtest | ||||
return 18444; | |||||
} | |||||
nakihito: This function will be removed in a future patch, but these changes are necessary now for proper… | |||||
} | } | ||||
// 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 |
This function will be removed in a future patch, but these changes are necessary now for proper regtest support.