diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 64d73b2826..503e86680b 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -104,6 +104,8 @@ public: // By default assume that the signatures in ancestors of this block are valid. consensus.defaultAssumeValid = uint256S("0x0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8"); //534292 + consensus.genesis_subsidy = 50*COIN; + /** * The message start string is designed to be unlikely to occur in normal data. * The characters are rarely used upper ASCII, not valid as UTF-8, and produce @@ -218,6 +220,8 @@ public: // By default assume that the signatures in ancestors of this block are valid. consensus.defaultAssumeValid = uint256S("0x0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75"); //1354312 + consensus.genesis_subsidy = 50*COIN; + pchMessageStart[0] = 0x0b; pchMessageStart[1] = 0x11; pchMessageStart[2] = 0x09; @@ -307,6 +311,8 @@ public: // By default assume that the signatures in ancestors of this block are valid. consensus.defaultAssumeValid = uint256S("0x00"); + consensus.genesis_subsidy = 50*COIN; + pchMessageStart[0] = 0xfa; pchMessageStart[1] = 0xbf; pchMessageStart[2] = 0xb5; @@ -420,6 +426,9 @@ class CCustomParams : public CRegTestParams { consensus.nMinimumChainWork = uint256S(args.GetArg("-con_nminimumchainwork", "0x0")); consensus.defaultAssumeValid = uint256S(args.GetArg("-con_defaultassumevalid", "0x00")); + // No subsidy for custom chains by default + consensus.genesis_subsidy = args.GetArg("-con_blocksubsidy", 0); + // All non-zero coinbase outputs must go to this scriptPubKey std::vector man_bytes = ParseHex(gArgs.GetArg("-con_mandatorycoinbase", "")); consensus.mandatory_coinbase_destination = CScript(man_bytes.begin(), man_bytes.end()); // Blank script allows any coinbase destination diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 09a5581bb8..4fb9b05da0 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -24,6 +24,7 @@ void SetupChainParamsBaseOptions() gArgs.AddArg("-vbparams=deployment:start:end", "Use given start/end times for specified version bits deployment (regtest or custom only)", true, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-con_mandatorycoinbase", "All non-zero valued coinbase outputs must go to this scriptPubKey, if set.", false, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-seednode=", "Use specified node as seed node. This option can be specified multiple times to connect to multiple nodes. (custom only)", true, OptionsCategory::CHAINPARAMS); + gArgs.AddArg("-con_blocksubsidy", "Defines the amount of block subsidy to start with, at genesis block.", false, OptionsCategory::CHAINPARAMS); } static std::unique_ptr globalChainBaseParams; diff --git a/src/consensus/params.h b/src/consensus/params.h index 44867580e2..e0018ca65b 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -12,6 +12,7 @@ #include #include