@@ -1044,26 +1044,28 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
10441044 // Even though just checking direct mempool parents for inheritance would be sufficient, we
10451045 // check using the full ancestor set here because it's more convenient to use what we have
10461046 // already calculated.
1047- if (const auto err{SingleTRUCChecks (ws.m_ptx , ws.m_ancestors , ws.m_conflicts , ws.m_vsize )}) {
1048- // Single transaction contexts only.
1049- if (args.m_allow_sibling_eviction && err->second != nullptr ) {
1050- // We should only be considering where replacement is considered valid as well.
1051- Assume (args.m_allow_replacement );
1052-
1053- // Potential sibling eviction. Add the sibling to our list of mempool conflicts to be
1054- // included in RBF checks.
1055- ws.m_conflicts .insert (err->second ->GetHash ());
1056- // Adding the sibling to m_iters_conflicting here means that it doesn't count towards
1057- // RBF Carve Out above. This is correct, since removing to-be-replaced transactions from
1058- // the descendant count is done separately in SingleTRUCChecks for TRUC transactions.
1059- ws.m_iters_conflicting .insert (m_pool.GetIter (err->second ->GetHash ()).value ());
1060- ws.m_sibling_eviction = true ;
1061- // The sibling will be treated as part of the to-be-replaced set in ReplacementChecks.
1062- // Note that we are not checking whether it opts in to replaceability via BIP125 or TRUC
1063- // (which is normally done in PreChecks). However, the only way a TRUC transaction can
1064- // have a non-TRUC and non-BIP125 descendant is due to a reorg.
1065- } else {
1066- return state.Invalid (TxValidationResult::TX_MEMPOOL_POLICY, " TRUC-violation" , err->first );
1047+ if (!args.m_bypass_limits ) {
1048+ if (const auto err{SingleTRUCChecks (ws.m_ptx , ws.m_ancestors , ws.m_conflicts , ws.m_vsize )}) {
1049+ // Single transaction contexts only.
1050+ if (args.m_allow_sibling_eviction && err->second != nullptr ) {
1051+ // We should only be considering where replacement is considered valid as well.
1052+ Assume (args.m_allow_replacement );
1053+
1054+ // Potential sibling eviction. Add the sibling to our list of mempool conflicts to be
1055+ // included in RBF checks.
1056+ ws.m_conflicts .insert (err->second ->GetHash ());
1057+ // Adding the sibling to m_iters_conflicting here means that it doesn't count towards
1058+ // RBF Carve Out above. This is correct, since removing to-be-replaced transactions from
1059+ // the descendant count is done separately in SingleTRUCChecks for TRUC transactions.
1060+ ws.m_iters_conflicting .insert (m_pool.GetIter (err->second ->GetHash ()).value ());
1061+ ws.m_sibling_eviction = true ;
1062+ // The sibling will be treated as part of the to-be-replaced set in ReplacementChecks.
1063+ // Note that we are not checking whether it opts in to replaceability via BIP125 or TRUC
1064+ // (which is normally done in PreChecks). However, the only way a TRUC transaction can
1065+ // have a non-TRUC and non-BIP125 descendant is due to a reorg.
1066+ } else {
1067+ return state.Invalid (TxValidationResult::TX_MEMPOOL_POLICY, " TRUC-violation" , err->first );
1068+ }
10671069 }
10681070 }
10691071
0 commit comments