mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 02:02:42 +02:00
[refactor] Remove netaddress.h from kernel headers
Move functions requiring the netaddress.h include out of libbitcoinkernel source files. The netaddress.h file contains many non-consensus related definitions and should thus not be part of the libbitcoinkernel. This commit makes netaddress.h no longer a required include for users of the libbitcoinkernel. This commit is part of the libbitcoinkernel project, namely its stage 1 step 3: Decouple most non-consensus headers from libbitcoinkernel.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
|
||||
#include <consensus/params.h>
|
||||
#include <kernel/messagestartchars.h>
|
||||
#include <netaddress.h>
|
||||
#include <primitives/block.h>
|
||||
#include <uint256.h>
|
||||
#include <util/chaintype.h>
|
||||
@@ -89,15 +88,6 @@ public:
|
||||
const Consensus::Params& GetConsensus() const { return consensus; }
|
||||
const MessageStartChars& MessageStart() const { return pchMessageStart; }
|
||||
uint16_t GetDefaultPort() const { return nDefaultPort; }
|
||||
uint16_t GetDefaultPort(Network net) const
|
||||
{
|
||||
return net == NET_I2P ? I2P_SAM31_PORT : GetDefaultPort();
|
||||
}
|
||||
uint16_t GetDefaultPort(const std::string& addr) const
|
||||
{
|
||||
CNetAddr a;
|
||||
return a.SetSpecial(addr) ? GetDefaultPort(a.GetNetwork()) : GetDefaultPort();
|
||||
}
|
||||
|
||||
const CBlock& GenesisBlock() const { return genesis; }
|
||||
/** Default value for -checkmempool and -checkblockindex argument */
|
||||
|
||||
Reference in New Issue
Block a user