Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/evo/specialtxman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,19 @@ static bool CheckSpecialTxInner(const CTransaction& tx, const CBlockIndex* pinde
}
return CheckMNHFTx(tx, pindexPrev, state);
case TRANSACTION_ASSET_LOCK:
case TRANSACTION_ASSET_UNLOCK:
if (!llmq::utils::IsV20Active(pindexPrev)) {
return state.Invalid(TxValidationResult::TX_CONSENSUS, "assetlocks-before-v20");
}
return CheckAssetLockUnlockTx(tx, pindexPrev, indexes, state);
case TRANSACTION_ASSET_UNLOCK:
if (Params().NetworkIDString() == CBaseChainParams::REGTEST && !llmq::utils::IsV20Active(pindexPrev)) {
// TODO: adjust functional tests to make it activated by MN_RR on regtest too
return state.Invalid(TxValidationResult::TX_CONSENSUS, "assetunlocks-before-v20");
}
if (Params().NetworkIDString() != CBaseChainParams::REGTEST && !llmq::utils::IsMNRewardReallocationActive(pindexPrev)) {
return state.Invalid(TxValidationResult::TX_CONSENSUS, "assetunlocks-before-mn_rr");
}
return CheckAssetLockUnlockTx(tx, pindexPrev, indexes, state);
}
} catch (const std::exception& e) {
LogPrintf("%s -- failed: %s\n", __func__, e.what());
Expand Down
8 changes: 8 additions & 0 deletions src/llmq/ehf_signals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ void CEHFSignalsHandler::UpdatedBlockTip(const CBlockIndex* const pindexNew)
return;
}

if (Params().NetworkIDString() == CBaseChainParams::MAIN) {
// TODO: v20 will never attempt to create EHF messages on main net; if this is needed it will be done by v20.1 or v21 nodes
return;
}
// TODO: should do this for all not-yet-signied bits
trySignEHFSignal(Params().GetConsensus().vDeployments[Consensus::DEPLOYMENT_MN_RR].bit, pindexNew);
}
Expand Down Expand Up @@ -91,6 +95,10 @@ void CEHFSignalsHandler::trySignEHFSignal(int bit, const CBlockIndex* const pind

void CEHFSignalsHandler::HandleNewRecoveredSig(const CRecoveredSig& recoveredSig)
{
if (Params().NetworkIDString() == CBaseChainParams::MAIN) {
// TODO: v20 will never attempt to create EHF messages on main net; if this is needed it will be done by v20.1 or v21 nodes
return;
}
if (g_txindex) {
g_txindex->BlockUntilSyncedToCurrentChain();
}
Expand Down