diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -521,7 +521,6 @@ interfaces/chain.cpp interfaces/node.cpp miner.cpp - minerfund.cpp net.cpp net_processing.cpp node/coin.cpp diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -180,7 +180,6 @@ memusage.h \ merkleblock.h \ miner.h \ - minerfund.h \ net.h \ net_permissions.h \ net_processing.h \ @@ -325,7 +324,6 @@ interfaces/node.cpp \ dbwrapper.cpp \ miner.cpp \ - minerfund.cpp \ net.cpp \ net_processing.cpp \ node/coin.cpp \ diff --git a/src/chainparams.cpp b/src/chainparams.cpp --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -108,46 +108,6 @@ // December 31, 2008 .nTimeout = 1230767999, }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND] = { - .bit = 0, - // 66% of 2016 - .nActivationThreshold = 1344, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_ABC] = { - .bit = 1, - // 66% of 2016 - .nActivationThreshold = 1344, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_BCHD] = { - .bit = 2, - // 66% of 2016 - .nActivationThreshold = 1344, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus - .vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_ELECTRON_CASH] = { - .bit = 3, - // 66% of 2016 - .nActivationThreshold = 1344, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - - // The miner fund is enabled by default on mainnet. - consensus.enableMinerFund = true; // The best chain should have at least this much work. consensus.nMinimumChainWork = @@ -343,46 +303,6 @@ // December 31, 2008 .nTimeout = 1230767999, }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND] = { - .bit = 0, - // 66% of 2016 - .nActivationThreshold = 1344, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_ABC] = { - .bit = 1, - // 66% of 2016 - .nActivationThreshold = 1344, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_BCHD] = { - .bit = 2, - // 66% of 2016 - .nActivationThreshold = 1344, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus - .vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_ELECTRON_CASH] = { - .bit = 3, - // 66% of 2016 - .nActivationThreshold = 1344, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - - // The miner fund is disabled by default on testnet. - consensus.enableMinerFund = false; // The best chain should have at least this much work. consensus.nMinimumChainWork = @@ -529,46 +449,6 @@ // 75% of 144 .nActivationThreshold = 108, }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND] = { - .bit = 0, - // 66% of 144 - .nActivationThreshold = 96, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_ABC] = { - .bit = 1, - // 66% of 144 - .nActivationThreshold = 96, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus.vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_BCHD] = { - .bit = 2, - // 66% of 144 - .nActivationThreshold = 96, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - consensus - .vDeployments[Consensus::DEPLOYEMENT_MINER_FUND_ELECTRON_CASH] = { - .bit = 3, - // 66% of 144 - .nActivationThreshold = 96, - // Nov 15, 2019 12:00:00 UTC - .nStartTime = 1573819200, - // May 15, 2020 12:00:00 UTC - .nTimeout = 1589544000, - }; - - // The miner fund is disabled by default on regnet. - consensus.enableMinerFund = false; // The best chain should have at least this much work. consensus.nMinimumChainWork = uint256S("0x00"); diff --git a/src/consensus/params.h b/src/consensus/params.h --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -15,10 +15,6 @@ enum DeploymentPos { DEPLOYMENT_TESTDUMMY, - DEPLOYEMENT_MINER_FUND, - DEPLOYEMENT_MINER_FUND_ABC, - DEPLOYEMENT_MINER_FUND_BCHD, - DEPLOYEMENT_MINER_FUND_ELECTRON_CASH, // NOTE: Also add new deployments to VersionBitsDeploymentInfo in // versionbitsinfo.cpp MAX_VERSION_BITS_DEPLOYMENTS, @@ -95,9 +91,6 @@ uint32_t nMinerConfirmationWindow; BIP9Deployment vDeployments[MAX_VERSION_BITS_DEPLOYMENTS]; - /** Enable or disable te miner fund by default */ - bool enableMinerFund; - /** Proof of work parameters */ uint256 powLimit; bool fPowAllowMinDifficultyBlocks; diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -357,7 +357,6 @@ std::vector hidden_args = { "-h", "-help", "-dbcrashratio", "-forcecompactdb", "-parkdeepreorg", "-automaticunparking", "-replayprotectionactivationtime", - "-enableminerfund", // GUI args. These will be overwritten by SetupUIArgs for the GUI "-allowselfsignedrootcertificates", "-choosedatadir", "-lang=", "-min", "-resetguisettings", "-rootcertificates=", "-splash", diff --git a/src/miner.cpp b/src/miner.cpp --- a/src/miner.cpp +++ b/src/miner.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -191,15 +190,6 @@ nFees + GetBlockSubsidy(nHeight, consensusParams); coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0; - const std::vector whitelisted = - GetMinerFundWhitelist(consensusParams, pindexPrev); - if (!whitelisted.empty()) { - const Amount fund = coinbaseTx.vout[0].nValue / MINER_FUND_RATIO; - coinbaseTx.vout[0].nValue -= fund; - coinbaseTx.vout.emplace_back(fund, - GetScriptForDestination(whitelisted[0])); - } - // Make sure the coinbase is big enough. uint64_t coinbaseSize = ::GetSerializeSize(coinbaseTx, PROTOCOL_VERSION); if (coinbaseSize < MIN_TX_SIZE) { diff --git a/src/minerfund.h b/src/minerfund.h deleted file mode 100644 --- a/src/minerfund.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2020 The Bitcoin developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#ifndef BITCOIN_MINERFUND_H -#define BITCOIN_MINERFUND_H - -#include