Return improved error message when trying to spend Coinbase coins (#1373).

Extra parameter added to AvailableCoins to include or exclude Coinbase coins.
SelectCoins, used for sending taddr->taddr, will exclude Coinbase coins.

Added qa rpc test and a runtime parameter -regtestprotectcoinbase to enforce
the coinbase->zaddr consensus rule in regtest mode.
This commit is contained in:
Simon
2016-09-22 11:30:32 -07:00
parent f2c99399b8
commit 2b1cda3b6a
7 changed files with 182 additions and 9 deletions

View File

@@ -83,6 +83,8 @@ public:
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 */
void SetRegTestCoinbaseMustBeProtected() { consensus.fCoinbaseMustBeProtected = true; }
protected:
CChainParams() {}