fix coinbase spend after 10080 & seg fault
This commit is contained in:
@@ -394,7 +394,7 @@ const CScript &CCoinsViewCache::GetSpendFor(const CCoins *coins, const CTxIn& in
|
|||||||
return LaunchMap().lmap[hc];
|
return LaunchMap().lmap[hc];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else return coins->vout[input.prevout.n].scriptPubKey;
|
return coins->vout[input.prevout.n].scriptPubKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CScript &CCoinsViewCache::GetSpendFor(const CTxIn& input) const
|
const CScript &CCoinsViewCache::GetSpendFor(const CTxIn& input) const
|
||||||
|
|||||||
@@ -2069,7 +2069,7 @@ namespace Consensus {
|
|||||||
if (fCoinbaseEnforcedProtectionEnabled &&
|
if (fCoinbaseEnforcedProtectionEnabled &&
|
||||||
consensusParams.fCoinbaseMustBeProtected &&
|
consensusParams.fCoinbaseMustBeProtected &&
|
||||||
!tx.vout.empty() &&
|
!tx.vout.empty() &&
|
||||||
(strcmp(ASSETCHAINS_SYMBOL, "VRSC") != 0 || nSpendHeight >= 10080)) {
|
(strcmp(ASSETCHAINS_SYMBOL, "VRSC") != 0 || (nSpendHeight >= 10080 && coins->nHeight >= 10080)) {
|
||||||
return state.Invalid(
|
return state.Invalid(
|
||||||
error("CheckInputs(): tried to spend coinbase with transparent outputs"),
|
error("CheckInputs(): tried to spend coinbase with transparent outputs"),
|
||||||
REJECT_INVALID, "bad-txns-coinbase-spend-has-transparent-outputs");
|
REJECT_INVALID, "bad-txns-coinbase-spend-has-transparent-outputs");
|
||||||
|
|||||||
Reference in New Issue
Block a user