Files
routstr-core/routstr
Jeroen UbbinkandClaude Opus 5 027bb3da31 fix(pricing): reject an exchange quote that underflows the sats price
A quote of `1e-320` is finite and positive, so it passed the feed's guards and
then won the `min()` — but the node prices in sats, and `1e-320 / 100_000_000`
is `0.0`. A zero sats price divides by zero on every model's rate, so one
malformed feed could take the node's pricing down while two healthy quotes
stood beside it.

Require the quote to survive the conversion it is going to be put through, and
name the divisor while it has two call sites.

Also drops a line from the boolean-quote test that said this coercion was the
only one rejecting booleans; they all share one now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014X8RZzzbAuQCbavhFjTvJ4
2026-08-26 15:50:26 +02:00
..
2026-08-23 11:06:06 +02:00
2026-08-15 15:09:00 +02:00