Commit 642baa6
f - Avoid fuzz hash collisions in outpoint spent checks
Under fuzz hashing, txids have only 8 effective bits, so outpoints from
unrelated transactions in old blocks frequently collide. This causes
is_outpoint_spent to produce false positives, silently preventing
legitimate transactions from being added to the pending pool or
confirmed.
Limit is_outpoint_spent to the last 6 blocks. Confirmed transactions
are always followed by 5 empty blocks, so the scan window covers
exactly one block with transactions. This catches real double-spends
(same-channel splice RBF candidates) while avoiding false positives
from older blocks.
Also remove the is_outpoint_spent check from add_pending_tx so that
filtering decisions are made at confirmation time (in confirm_pending_txs)
rather than at add time. This ensures all candidates participate in
the deterministic sort before any are rejected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c972bf2 commit 642baa6
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
| |||
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 244 | + | |
243 | 245 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
| |||
0 commit comments