Remove Founders' Reward override from #1398
This commit is contained in:
parent
9f15b823ac
commit
2f5d62fe32
|
@ -398,14 +398,6 @@ std::string CChainParams::GetFoundersRewardAddressAtHeight(int nHeight) const {
|
||||||
CScript CChainParams::GetFoundersRewardScriptAtHeight(int nHeight) const {
|
CScript CChainParams::GetFoundersRewardScriptAtHeight(int nHeight) const {
|
||||||
assert(nHeight > 0 && nHeight <= consensus.GetLastFoundersRewardBlockHeight());
|
assert(nHeight > 0 && nHeight <= consensus.GetLastFoundersRewardBlockHeight());
|
||||||
|
|
||||||
// #1398 START
|
|
||||||
// We can remove this code when miner_tests no longer expect this script
|
|
||||||
if (fMinerTestModeForFoundersRewardScript) {
|
|
||||||
auto rewardScript = ParseHex("a9146708e6670db0b950dac68031025cc5b63213a49187");
|
|
||||||
return CScript(rewardScript.begin(), rewardScript.end());
|
|
||||||
}
|
|
||||||
// #1398 END
|
|
||||||
|
|
||||||
CBitcoinAddress address(GetFoundersRewardAddressAtHeight(nHeight).c_str());
|
CBitcoinAddress address(GetFoundersRewardAddressAtHeight(nHeight).c_str());
|
||||||
assert(address.IsValid());
|
assert(address.IsValid());
|
||||||
assert(address.IsScript());
|
assert(address.IsScript());
|
||||||
|
|
|
@ -81,8 +81,6 @@ public:
|
||||||
std::string GetFoundersRewardAddressAtHeight(int height) const;
|
std::string GetFoundersRewardAddressAtHeight(int height) const;
|
||||||
CScript GetFoundersRewardScriptAtHeight(int height) const;
|
CScript GetFoundersRewardScriptAtHeight(int height) const;
|
||||||
std::string GetFoundersRewardAddressAtIndex(int i) const;
|
std::string GetFoundersRewardAddressAtIndex(int i) const;
|
||||||
/** #1398 to return a fixed founders reward script for miner_tests */
|
|
||||||
bool fMinerTestModeForFoundersRewardScript = false;
|
|
||||||
/** Enforce coinbase consensus rule in regtest mode */
|
/** Enforce coinbase consensus rule in regtest mode */
|
||||||
void SetRegTestCoinbaseMustBeProtected() { consensus.fCoinbaseMustBeProtected = true; }
|
void SetRegTestCoinbaseMustBeProtected() { consensus.fCoinbaseMustBeProtected = true; }
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -138,14 +138,6 @@ struct {
|
||||||
// NOTE: These tests rely on CreateNewBlock doing its own self-validation!
|
// NOTE: These tests rely on CreateNewBlock doing its own self-validation!
|
||||||
BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
||||||
{
|
{
|
||||||
// #1398 START
|
|
||||||
// Current test data expects to receive a reward script for the address
|
|
||||||
// 2N2e2FRfP9D1dRN1oRWkH7pbFM69eGNAuQ4 even though the test is run on mainnet
|
|
||||||
// and not testnet, and there are many founders reward addresses not just one.
|
|
||||||
// When test data is re-generated, we will no longer need to do this.
|
|
||||||
Params(CBaseChainParams::MAIN).fMinerTestModeForFoundersRewardScript = true;
|
|
||||||
// #1398 END
|
|
||||||
|
|
||||||
CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
|
CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
|
||||||
CBlockTemplate *pblocktemplate;
|
CBlockTemplate *pblocktemplate;
|
||||||
CMutableTransaction tx,tx2;
|
CMutableTransaction tx,tx2;
|
||||||
|
|
Loading…
Reference in New Issue