Commit 50ef162
apollo_mempool: use saturating_sub for n_stuck_txs accounting (#14560)
Replace the two unchecked `n_stuck_txs -=` subtractions in
decrement_stuck_txs_if_gap_account and remove_from_accounts_with_gap with
saturating_sub. Guards against a latent underflow that would panic under
overflow-checked builds and silently wrap the MEMPOOL_STUCK_TXS gauge in
release.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 9fb88b4 commit 50ef162
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | | - | |
| 925 | + | |
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
| 933 | + | |
| 934 | + | |
934 | 935 | | |
935 | 936 | | |
936 | 937 | | |
| |||
0 commit comments