Commit 0a78539
authored
fix: add iteration limit to SPV fee calculation loop (#620)
Replace unbounded loop with a capped for loop (max 50 iterations)
in the SPV fee calculation to prevent potential infinite loops when
the scale factor converges but never meets the exit condition.
Cherry-picked from ralph/improvements (commit 557acb2).
Co-authored-by: PastaClaw <thepastaclaw@users.noreply.github.com>1 parent cbc9bc5 commit 0a78539
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| 531 | + | |
| 532 | + | |
531 | 533 | | |
532 | 534 | | |
533 | 535 | | |
534 | 536 | | |
535 | | - | |
| 537 | + | |
536 | 538 | | |
537 | 539 | | |
538 | 540 | | |
| |||
574 | 576 | | |
575 | 577 | | |
576 | 578 | | |
| 579 | + | |
| 580 | + | |
577 | 581 | | |
578 | 582 | | |
579 | 583 | | |
| |||
0 commit comments