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:
@@ -336,6 +336,11 @@ CChainParams &Params(CBaseChainParams::Network network) {
|
||||
void SelectParams(CBaseChainParams::Network network) {
|
||||
SelectBaseParams(network);
|
||||
pCurrentParams = &Params(network);
|
||||
|
||||
// Some python qa rpc tests need to enforce the coinbase consensus rule
|
||||
if (network == CBaseChainParams::REGTEST && mapArgs.count("-regtestprotectcoinbase")) {
|
||||
regTestParams.SetRegTestCoinbaseMustBeProtected();
|
||||
}
|
||||
}
|
||||
|
||||
bool SelectParamsFromCommandLine()
|
||||
|
||||
Reference in New Issue
Block a user