@@ -1025,26 +1025,28 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
10251025    //  Even though just checking direct mempool parents for inheritance would be sufficient, we
10261026    //  check using the full ancestor set here because it's more convenient to use what we have
10271027    //  already calculated.
1028-     if  (const  auto  err{SingleTRUCChecks (ws.m_ptx , ws.m_ancestors , ws.m_conflicts , ws.m_vsize )}) {
1029-         //  Single transaction contexts only.
1030-         if  (args.m_allow_sibling_eviction  && err->second  != nullptr ) {
1031-             //  We should only be considering where replacement is considered valid as well.
1032-             Assume (args.m_allow_replacement );
1033- 
1034-             //  Potential sibling eviction. Add the sibling to our list of mempool conflicts to be
1035-             //  included in RBF checks.
1036-             ws.m_conflicts .insert (err->second ->GetHash ());
1037-             //  Adding the sibling to m_iters_conflicting here means that it doesn't count towards
1038-             //  RBF Carve Out above. This is correct, since removing to-be-replaced transactions from
1039-             //  the descendant count is done separately in SingleTRUCChecks for TRUC transactions.
1040-             ws.m_iters_conflicting .insert (m_pool.GetIter (err->second ->GetHash ()).value ());
1041-             ws.m_sibling_eviction  = true ;
1042-             //  The sibling will be treated as part of the to-be-replaced set in ReplacementChecks.
1043-             //  Note that we are not checking whether it opts in to replaceability via BIP125 or TRUC
1044-             //  (which is normally done in PreChecks). However, the only way a TRUC transaction can
1045-             //  have a non-TRUC and non-BIP125 descendant is due to a reorg.
1046-         } else  {
1047-             return  state.Invalid (TxValidationResult::TX_MEMPOOL_POLICY, " TRUC-violation" first );
1028+     if  (!args.m_bypass_limits ) {
1029+         if  (const  auto  err{SingleTRUCChecks (ws.m_ptx , ws.m_ancestors , ws.m_conflicts , ws.m_vsize )}) {
1030+             //  Single transaction contexts only.
1031+             if  (args.m_allow_sibling_eviction  && err->second  != nullptr ) {
1032+                 //  We should only be considering where replacement is considered valid as well.
1033+                 Assume (args.m_allow_replacement );
1034+ 
1035+                 //  Potential sibling eviction. Add the sibling to our list of mempool conflicts to be
1036+                 //  included in RBF checks.
1037+                 ws.m_conflicts .insert (err->second ->GetHash ());
1038+                 //  Adding the sibling to m_iters_conflicting here means that it doesn't count towards
1039+                 //  RBF Carve Out above. This is correct, since removing to-be-replaced transactions from
1040+                 //  the descendant count is done separately in SingleTRUCChecks for TRUC transactions.
1041+                 ws.m_iters_conflicting .insert (m_pool.GetIter (err->second ->GetHash ()).value ());
1042+                 ws.m_sibling_eviction  = true ;
1043+                 //  The sibling will be treated as part of the to-be-replaced set in ReplacementChecks.
1044+                 //  Note that we are not checking whether it opts in to replaceability via BIP125 or TRUC
1045+                 //  (which is normally done in PreChecks). However, the only way a TRUC transaction can
1046+                 //  have a non-TRUC and non-BIP125 descendant is due to a reorg.
1047+             } else  {
1048+                 return  state.Invalid (TxValidationResult::TX_MEMPOOL_POLICY, " TRUC-violation" first );
1049+             }
10481050        }
10491051    }
10501052
0 commit comments