fix coinbase spend after 10080 & seg fault

This commit is contained in:
Michael Toutonghi
2018-05-25 21:52:53 -07:00
parent da45808f5f
commit c1e7194760
2 changed files with 2 additions and 2 deletions

View File

@@ -2069,7 +2069,7 @@ namespace Consensus {
if (fCoinbaseEnforcedProtectionEnabled &&
consensusParams.fCoinbaseMustBeProtected &&
!tx.vout.empty() &&
(strcmp(ASSETCHAINS_SYMBOL, "VRSC") != 0 || nSpendHeight >= 10080)) {
(strcmp(ASSETCHAINS_SYMBOL, "VRSC") != 0 || (nSpendHeight >= 10080 && coins->nHeight >= 10080)) {
return state.Invalid(
error("CheckInputs(): tried to spend coinbase with transparent outputs"),
REJECT_INVALID, "bad-txns-coinbase-spend-has-transparent-outputs");