Commit 0405467
simln-lib: make the remaining selects biased
Two select! loops still polled their branches in tokio's default random order:
the payment-failure result send in produce_simulation_results, and the
interceptor-result drain in the SimNode HTLC forwarding path. Random branch
selection is a source of run-to-run non-determinism.
Make both biased so their poll order is fixed. Branch order is unchanged, so
behaviour is identical save for the now-deterministic ordering. The shutdown
listener already sits first in the failure-send loop, matching the
shutdown-first convention used elsewhere.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4cbad7a commit 0405467
2 files changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1514 | 1514 | | |
1515 | 1515 | | |
1516 | 1516 | | |
| 1517 | + | |
1517 | 1518 | | |
1518 | 1519 | | |
1519 | 1520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
| 967 | + | |
967 | 968 | | |
968 | 969 | | |
969 | 970 | | |
| |||
0 commit comments