Commit e207dd6
committed
refactor(spv): single source for the pending-islock expiry check + log
The `is_expired` test and its "Dropping InstantLock for txid ... after
awaiting quorum data" warning were duplicated between `validate_pending`
(the re-validation loop) and `expire_pending` (the advancement-independent
sweep), so a future change to PENDING_TTL or to the message would have to
be made in both places.
Fold both into `PendingInstantLock::is_expired_logged`, next to the
`is_expired` predicate and the `first_seen` field it reads. Callers keep
their own bookkeeping — `validate_pending` still counts the drop as
invalid and skips re-verification, `expire_pending` still filters the
queue and updates progress — so behaviour is unchanged.
Addresses the remaining CodeRabbit nitpick on #895.1 parent a69e57d commit e207dd6
1 file changed
Lines changed: 23 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
| |||
262 | 283 | | |
263 | 284 | | |
264 | 285 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 286 | + | |
272 | 287 | | |
273 | 288 | | |
274 | 289 | | |
| |||
334 | 349 | | |
335 | 350 | | |
336 | 351 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 352 | + | |
348 | 353 | | |
349 | 354 | | |
350 | 355 | | |
| |||
0 commit comments