@@ -842,6 +842,9 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
842
842
}
843
843
844
844
auto spk_reuse_mode = SpkReuseMode;
845
+ if (ignore_rejects.count (" txn-spk-reused" )) {
846
+ spk_reuse_mode = SRM_ALLOW;
847
+ }
845
848
SPKStates_t mapSPK;
846
849
847
850
// Check for conflicts with in-memory transactions
@@ -897,7 +900,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
897
900
}
898
901
}
899
902
if (mapSPK.find (hashSPK) != mapSPK.end ()) {
900
- return state. Invalid (TxValidationResult::TX_MEMPOOL_POLICY, " txn-spk-reused-twinoutputs" );
903
+ MaybeReject (TxValidationResult::TX_MEMPOOL_POLICY, " txn-spk-reused-twinoutputs" );
901
904
}
902
905
mapSPK[hashSPK] = MemPool_SPK_State (mapSPK[hashSPK] | MSS_CREATED);
903
906
}
@@ -963,7 +966,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
963
966
SPKStates_t::iterator mssit = mapSPK.find (hashSPK);
964
967
if (mssit != mapSPK.end ()) {
965
968
if (mssit->second & MSS_CREATED) {
966
- return state. Invalid (TxValidationResult::TX_MEMPOOL_POLICY, " txn-spk-reused-change" );
969
+ MaybeReject (TxValidationResult::TX_MEMPOOL_POLICY, " txn-spk-reused-change" );
967
970
}
968
971
}
969
972
const auto & SPKit = m_pool.mapUsedSPK .find (hashSPK);
@@ -1161,7 +1164,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
1161
1164
return state.Invalid (TxValidationResult::TX_CONSENSUS, " bad-txns-spends-conflicting-tx" , *err_string);
1162
1165
}
1163
1166
if (has_policy_conflict) {
1164
- return state. Invalid (TxValidationResult::TX_MEMPOOL_POLICY, " txn-spk-reused-chained" );
1167
+ MaybeReject (TxValidationResult::TX_MEMPOOL_POLICY, " txn-spk-reused-chained" );
1165
1168
}
1166
1169
1167
1170
// We want to detect conflicts in any tx in a package to trigger package RBF logic
0 commit comments