#define BITCOIN_CHAINPARAMS_H
#include "chainparamsbase.h"
-#include "checkpoints.h"
#include "consensus/params.h"
#include "primitives/block.h"
#include "protocol.h"
uint16_t port;
};
+typedef std::map<int, uint256> MapCheckpoints;
+
/**
* CChainParams defines various tweakable parameters of a given instance of the
ZCPAYMENT_ADDRRESS,
ZCSPENDING_KEY,
+ ZCVIEWING_KEY,
MAX_BASE58_TYPES
};
+ struct CCheckpointData {
+ MapCheckpoints mapCheckpoints;
+ int64_t nTimeLastCheckpoint;
+ int64_t nTransactionsLastCheckpoint;
+ double fTransactionsPerDay;
+ };
const Consensus::Params& GetConsensus() const { return consensus; }
const CMessageHeader::MessageStartChars& MessageStart() const { return pchMessageStart; }
const std::vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
int GetDefaultPort() const { return nDefaultPort; }
- /** Used if GenerateBitcoins is called with a negative number of threads */
- int DefaultMinerThreads() const { return nMinerThreads; }
const CBlock& GenesisBlock() const { return genesis; }
/** Make miner wait to have peers to avoid wasting work */
bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
const std::vector<SeedSpec6>& FixedSeeds() const { return vFixedSeeds; }
- const Checkpoints::CCheckpointData& Checkpoints() const { return checkpointData; }
+ const CCheckpointData& Checkpoints() const { return checkpointData; }
/** Return the founder's reward address and script for a given block height */
std::string GetFoundersRewardAddressAtHeight(int height) const;
CScript GetFoundersRewardScriptAtHeight(int height) const;
void SetRegTestCoinbaseMustBeProtected() { consensus.fCoinbaseMustBeProtected = true; }
void SetDefaultPort(uint16_t port) { nDefaultPort = port; }
+ void SetCheckpointData(CCheckpointData checkpointData);
+
//void setnonce(uint32_t nonce) { memcpy(&genesis.nNonce,&nonce,sizeof(nonce)); }
//void settimestamp(uint32_t timestamp) { genesis.nTime = timestamp; }
//void setgenesis(CBlock &block) { genesis = block; }
//void recalc_genesis(uint32_t nonce) { genesis = CreateGenesisBlock(ASSETCHAINS_TIMESTAMP, nonce, GENESIS_NBITS, 1, COIN); };
int nDefaultPort = 0;
CMessageHeader::MessageStartChars pchMessageStart; // jl777 moved
+ Consensus::Params consensus;
+
protected:
CChainParams() {}
- Consensus::Params consensus;
//! Raw pub key bytes for the broadcast alert signing key.
std::vector<unsigned char> vAlertPubKey;
bool fRequireStandard = false;
bool fMineBlocksOnDemand = false;
bool fTestnetToBeDeprecatedFieldRPC = false;
- Checkpoints::CCheckpointData checkpointData;
+ CCheckpointData checkpointData;
std::vector<std::string> vFoundersRewardAddress;
};
*/
bool SelectParamsFromCommandLine();
+/**
+ * Allows modifying the network upgrade regtest parameters.
+ */
+void UpdateNetworkUpgradeParameters(Consensus::UpgradeIndex idx, int nActivationHeight);
+
#endif // BITCOIN_CHAINPARAMS_H