added checkpoints for KMD blockchain. need to be tested.

- added method SetCheckpointData for CChainParams.
- as we can't check asset it or not in CMainParams() constructor, because command line arguments don't initialized at that time, we will execute SetCheckpointData in chainparams_commandline later.

changes was tested in komodo-qt wallet, but additional tests wouldn't be superfluous.
This commit is contained in:
DeckerSU
2018-01-27 13:28:43 +03:00
parent 5513bebbf2
commit b3f7ce9b7a
2 changed files with 191 additions and 1 deletions

View File

@@ -87,15 +87,18 @@ public:
void SetRegTestCoinbaseMustBeProtected() { consensus.fCoinbaseMustBeProtected = true; }
void SetDefaultPort(uint16_t port) { nDefaultPort = port; }
void SetCheckpointData(Checkpoints::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;