Restore zcash coinbase rule and launch fix at 10080

This commit is contained in:
Michael Toutonghi
2018-05-25 15:10:07 -07:00
parent a65fe46f84
commit 6c8e1cdfb7
5 changed files with 38 additions and 7 deletions

View File

@@ -31,7 +31,9 @@
#include "wallet/asyncrpcoperation_sendmany.h"
#include "wallet/asyncrpcoperation_shieldcoinbase.h"
#include <cstring>
#include <sstream>
#include <unordered_map>
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
@@ -2045,7 +2047,7 @@ namespace Consensus {
const COutPoint &prevout = tx.vin[i].prevout;
const CCoins *coins = inputs.AccessCoins(prevout.hash);
assert(coins);
if (coins->IsCoinBase()) {
// Ensure that coinbases are matured
if (nSpendHeight - coins->nHeight < COINBASE_MATURITY) {
@@ -2066,7 +2068,8 @@ namespace Consensus {
// Disabled on regtest
if (fCoinbaseEnforcedProtectionEnabled &&
consensusParams.fCoinbaseMustBeProtected &&
!tx.vout.empty()) {
!tx.vout.empty() &&
(strcmp(ASSETCHAINS_SYMBOL, "VRSC", 4) != 0 || nSpendHeight >= 10080)) {
return state.Invalid(
error("CheckInputs(): tried to spend coinbase with transparent outputs"),
REJECT_INVALID, "bad-txns-coinbase-spend-has-transparent-outputs");