Skip to content

Commit

Permalink
mempool: Remove premature V2 transaction check
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Apr 27, 2024
1 parent 54384f5 commit af952e6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,12 +724,6 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
if (tx.IsCoinStake())
return state.Invalid(TxValidationResult::TX_CONSENSUS, "coinstake");

// Don't relay version 2 transactions until CSV is active, and we can be
// sure that such transactions will be mined (unless we're on
// -testnet/-regtest).
if (m_pool.m_require_standard && tx.nVersion >= TX_MAX_STANDARD_VERSION && !Params().GetConsensus().IsProtocolV3_1(nTimeTx))
return state.Invalid(TxValidationResult::TX_NOT_STANDARD, "premature-version2-tx");

// Reject transactions with witness before segregated witness activates (override with -prematurewitness)
bool witnessEnabled = DeploymentActiveAfter(m_active_chainstate.m_chain.Tip(), m_active_chainstate.m_chainman, Consensus::DEPLOYMENT_SEGWIT);
if (!gArgs.GetBoolArg("-prematurewitness", false) && tx.HasWitness() && !witnessEnabled) {
Expand Down

0 comments on commit af952e6

Please sign in to comment.