Merge branch 'beta' into mergemaster
# Conflicts: # src/main.cpp
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#define BITCOIN_CHAINPARAMS_H
|
||||
|
||||
#include "chainparamsbase.h"
|
||||
#include "checkpoints.h"
|
||||
#include "consensus/params.h"
|
||||
#include "primitives/block.h"
|
||||
#include "protocol.h"
|
||||
@@ -26,6 +25,8 @@ struct SeedSpec6 {
|
||||
uint16_t port;
|
||||
};
|
||||
|
||||
typedef std::map<int, uint256> MapCheckpoints;
|
||||
|
||||
|
||||
/**
|
||||
* CChainParams defines various tweakable parameters of a given instance of the
|
||||
@@ -46,17 +47,22 @@ public:
|
||||
|
||||
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; }
|
||||
@@ -78,7 +84,7 @@ public:
|
||||
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;
|
||||
@@ -87,7 +93,7 @@ public:
|
||||
void SetRegTestCoinbaseMustBeProtected() { consensus.fCoinbaseMustBeProtected = true; }
|
||||
|
||||
void SetDefaultPort(uint16_t port) { nDefaultPort = port; }
|
||||
void SetCheckpointData(Checkpoints::CCheckpointData checkpointData);
|
||||
void SetCheckpointData(CCheckpointData checkpointData);
|
||||
|
||||
//void setnonce(uint32_t nonce) { memcpy(&genesis.nNonce,&nonce,sizeof(nonce)); }
|
||||
//void settimestamp(uint32_t timestamp) { genesis.nTime = timestamp; }
|
||||
@@ -118,7 +124,7 @@ protected:
|
||||
bool fRequireStandard = false;
|
||||
bool fMineBlocksOnDemand = false;
|
||||
bool fTestnetToBeDeprecatedFieldRPC = false;
|
||||
Checkpoints::CCheckpointData checkpointData;
|
||||
CCheckpointData checkpointData;
|
||||
std::vector<std::string> vFoundersRewardAddress;
|
||||
};
|
||||
|
||||
@@ -140,4 +146,9 @@ void SelectParams(CBaseChainParams::Network network);
|
||||
*/
|
||||
bool SelectParamsFromCommandLine();
|
||||
|
||||
/**
|
||||
* Allows modifying the network upgrade regtest parameters.
|
||||
*/
|
||||
void UpdateNetworkUpgradeParameters(Consensus::UpgradeIndex idx, int nActivationHeight);
|
||||
|
||||
#endif // BITCOIN_CHAINPARAMS_H
|
||||
|
||||
Reference in New Issue
Block a user