aboutsummaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-09-12 13:42:52 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-09-12 22:51:46 +0200
commit36193af47c8dcff53e59498c416b85b59e0d0f91 (patch)
tree2cd1adfafb69d6e2b6e2bf627c39048692decf0a /src/kernel
parent2b08c55f01996e0b05763f05eac50b83ba9d5a8e (diff)
downloadbitcoin-36193af47c8dcff53e59498c416b85b59e0d0f91.tar.xz
[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.
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/chainparams.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/kernel/chainparams.h b/src/kernel/chainparams.h
index f1df878f60..63837bb23e 100644
--- a/src/kernel/chainparams.h
+++ b/src/kernel/chainparams.h
@@ -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 */