Skip to content

Commit

Permalink
proposal: signet restart (hash chain name too)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimon committed Sep 8, 2019
1 parent c0063a5 commit 6c2ec06
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ static CBlock CreateGenesisBlock(const CScript& coinbase_sig, const CScript& gen
return genesis;
}

static CBlock CreateSignetGenesisBlock(const CScript& block_script, uint32_t block_nonce)
static CBlock CreateSignetGenesisBlock(const std::string& chain_name, const CScript& block_script, uint32_t block_nonce)
{
CHashWriter h(SER_DISK, 0);
h << chain_name;
h << block_script;
uint256 hash = h.GetHash();
CScript coinbase_sig = CScript() << std::vector<uint8_t>(hash.begin(), hash.end());
Expand Down Expand Up @@ -314,7 +315,7 @@ class SigNetParams : public CChainParams {
nDefaultPort = 38333;
nPruneAfterHeight = 1000;

genesis = CreateSignetGenesisBlock(g_signet_blockscript, 621297);
genesis = CreateSignetGenesisBlock(strNetworkID, g_signet_blockscript, 621297);
consensus.hashGenesisBlock = genesis.GetHash();

// Now that genesis block has been generated, we check if there is an enforcescript, and switch
Expand Down

0 comments on commit 6c2ec06

Please sign in to comment.