Allow sprout when overwinter

This commit is contained in:
jl777
2018-12-15 04:57:12 -11:00
parent 2546ae048d
commit 9dceacbde8

View File

@@ -1079,7 +1079,9 @@ bool ContextualCheckTransaction(
if (overwinterActive) {
// Reject transactions intended for Sprout
if (!tx.fOverwintered) {
return state.DoS(dosLevel, error("ContextualCheckTransaction: overwinter is active"),
int32_t ht = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight;
return state.DoS(
return state.DoS((ht < 0 || nHeight < ht) ? 0 : dosLevel, error("ContextualCheckTransaction: overwinter is active"),
REJECT_INVALID, "tx-overwinter-active");
}