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];
|
||||
}
|
||||
}
|
||||
else return coins->vout[input.prevout.n].scriptPubKey;
|
||||
return coins->vout[input.prevout.n].scriptPubKey;
|
||||
}
|
||||
|
||||
const CScript &CCoinsViewCache::GetSpendFor(const CTxIn& input) const
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user