diff options
Diffstat (limited to 'src/chainparams.h')
-rw-r--r-- | src/chainparams.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/chainparams.h b/src/chainparams.h index 0692094478..bb95b3aa4a 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -19,6 +19,12 @@ struct CDNSSeedData { CDNSSeedData(const std::string &strName, const std::string &strHost) : name(strName), host(strHost) {} }; +struct SeedSpec6 { + uint8_t addr[16]; + uint16_t port; +}; + + /** * CChainParams defines various tweakable parameters of a given instance of the * Bitcoin system. There are three: the main network on which people trade goods @@ -56,8 +62,9 @@ public: bool MiningRequiresPeers() const { return fMiningRequiresPeers; } /** Default value for -checkmempool and -checkblockindex argument */ bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; } - /** Make standard checks */ + /** Policy: Filter transactions that do not match well-defined patterns */ bool RequireStandard() const { return fRequireStandard; } + int64_t PruneAfterHeight() const { return nPruneAfterHeight; } /** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */ bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; } /** In the future use NetworkIDString() for RPC fields */ @@ -66,8 +73,8 @@ public: std::string NetworkIDString() const { return strNetworkID; } const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; } const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; } - const std::vector<CAddress>& FixedSeeds() const { return vFixedSeeds; } - virtual const Checkpoints::CCheckpointData& Checkpoints() const = 0; + const std::vector<SeedSpec6>& FixedSeeds() const { return vFixedSeeds; } + const Checkpoints::CCheckpointData& Checkpoints() const { return checkpointData; } protected: CChainParams() {} @@ -77,22 +84,24 @@ protected: std::vector<unsigned char> vAlertPubKey; int nDefaultPort; int nMinerThreads; + uint64_t nPruneAfterHeight; std::vector<CDNSSeedData> vSeeds; std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES]; std::string strNetworkID; CBlock genesis; - std::vector<CAddress> vFixedSeeds; + std::vector<SeedSpec6> vFixedSeeds; bool fRequireRPCPassword; bool fMiningRequiresPeers; bool fDefaultConsistencyChecks; bool fRequireStandard; bool fMineBlocksOnDemand; bool fTestnetToBeDeprecatedFieldRPC; + Checkpoints::CCheckpointData checkpointData; }; /** - * Return the currently selected parameters. This won't change after app startup - * outside of the unit tests. + * Return the currently selected parameters. This won't change after app + * startup, except for unit tests. */ const CChainParams &Params(); |