feat: let asset-unlock transactions be available since v20 on all networks

It simplify implementation and unify RegTest, Mainnet and Testnet
No asset-unlock transaction has actually be mined yet, but v20 and mn_rr are activated long time ago.
So, this changes are not breaking changes
This commit is contained in:
Konstantin Akimov 2024-08-26 13:07:24 +07:00
parent 4b4001bbe7
commit 1d96fbf091
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -55,13 +55,9 @@ static bool CheckSpecialTxInner(CDeterministicMNManager& dmnman, const Chainstat
case TRANSACTION_ASSET_LOCK:
return CheckAssetLockUnlockTx(chainman.m_blockman, qman, tx, pindexPrev, indexes, state);
case TRANSACTION_ASSET_UNLOCK:
if (Params().NetworkIDString() == CBaseChainParams::REGTEST && !DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_V20)) {
// TODO: adjust functional tests to make it activated by MN_RR on regtest too
if (!DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_V20)) {
return state.Invalid(TxValidationResult::TX_CONSENSUS, "assetunlocks-before-v20");
}
if (Params().NetworkIDString() != CBaseChainParams::REGTEST && !DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_MN_RR)) {
return state.Invalid(TxValidationResult::TX_CONSENSUS, "assetunlocks-before-mn_rr");
}
return CheckAssetLockUnlockTx(chainman.m_blockman, qman, tx, pindexPrev, indexes, state);
}
} catch (const std::exception& e) {