Commit 13e53e6
committed
fix(payments): clear only the retested node's paid flag (double-pay fix)
audit/node-test.js retest branch called clearPaidNodes() — which wipes the ENTIRE
paid-set — when it only meant to clear the one node about to be re-paid. That
dropped every other node's paid flag and re-opened the duplicate-payment guard
for the whole run: any node re-encountered after that point could be paid a
second time from the live wallet.
Add core/session.js clearPaidNode(addr) (deletes one entry) and call it in the
retest branch instead. clearPaidNodes() (clear-all) stays for the legitimate
run-/pass-start resets in pipeline.js.
Adversarially reviewed: fix correct + complete for its target; no TEST RUN/import
regressions; test suite green (188/31/45/35). NOTE (follow-up, pre-existing): the
mid-run retest blocks at pipeline.js:1064/1137 still clearPaidNodes()+re-pay
already-paid nodes — a separate MEDIUM double-pay vector to fix next.1 parent ca7396a commit 13e53e6
2 files changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
0 commit comments