Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
comments improved
  • Loading branch information
kushti committed May 7, 2026
commit dafafb3fa73f1450ed2f8cc293922680a82bc5e6
Original file line number Diff line number Diff line change
Expand Up @@ -885,12 +885,7 @@ class ErgoMemPoolSpec extends AnyFlatSpec
poolAfter.size shouldBe 1
poolAfter.contains(tx3.transaction.id) shouldBe true

// After replacement, TX4 (lower fee) should be rejected as double-spending loser.
// BUG: acceptIfNoDoubleSpend does pool.put(newTx).remove(oldTxs), so the
// new tx's inputs are added first, then the old txs' inputs are removed.
// Because the old and new txs spend the SAME boxes, the removal wipes the
// input entries for the new tx. Consequently pool.inputs no longer tracks
// the boxes spent by TX3, and TX4 is not recognised as a double-spender.
// After replacement, TX4 (lower fee) should be rejected as double-spending loser
val (_, outcome4) = poolAfter.process(tx4, wus)
outcome4.isInstanceOf[ProcessingOutcome.DoubleSpendingLoser] shouldBe true
}
Expand Down
Loading