diff --git a/src/main.cpp b/src/main.cpp index 18769e520..a54d03ada 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1363,6 +1363,11 @@ bool ContextualCheckTransaction(int32_t slowflag,const CBlock *block, CBlockInde REJECT_INVALID, "bad-txns-invalid-script-data-for-coinbase-time-lock"); } + // Avoid ztx validation during IBD if height is less than latest checkpoint + if (fCheckpointsEnabled && (nHeight < Checkpoints::GetTotalBlocksEstimate(Params().Checkpoints())) ) { + return true; + } + if (!tx.vShieldedSpend.empty() || !tx.vShieldedOutput.empty()) {