|
|
@ -171,6 +171,27 @@ public: |
|
|
|
}; |
|
|
|
static CMainParams mainParams; |
|
|
|
|
|
|
|
CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward) |
|
|
|
{ |
|
|
|
CMutableTransaction txNew; |
|
|
|
txNew.nVersion = 1; |
|
|
|
txNew.vin.resize(1); |
|
|
|
txNew.vout.resize(1); |
|
|
|
txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << std::vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp)); |
|
|
|
txNew.vout[0].nValue = genesisReward; |
|
|
|
txNew.vout[0].scriptPubKey = genesisOutputScript; |
|
|
|
|
|
|
|
CBlock genesis; |
|
|
|
genesis.nTime = nTime; |
|
|
|
genesis.nBits = nBits; |
|
|
|
genesis.nNonce = nNonce; |
|
|
|
genesis.nVersion = nVersion; |
|
|
|
genesis.vtx.push_back(txNew); |
|
|
|
genesis.hashPrevBlock.SetNull(); |
|
|
|
genesis.hashMerkleRoot = BlockMerkleRoot(genesis); |
|
|
|
return genesis; |
|
|
|
} |
|
|
|
|
|
|
|
void *chainparams_commandline(void *ptr) |
|
|
|
{ |
|
|
|
//CChainParams *consensus = (CChainParams *)ptr;
|
|
|
|