-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
Currently, when something goes wrong/the corresponding pair can't be found, convert_fee_rate will default to a bogus 1.0 fee rate:
rust-esplora-client/src/lib.rs
Lines 90 to 94 in 7faab65
| pairs | |
| .into_iter() | |
| .find(|(k, _)| k <= &target) | |
| .map(|(_, v)| v) | |
| .unwrap_or(1.0) |
This however messes with users' assumptions they depend on receiving a correct fee update (e.g. in Lightning). Rather than returning a (btw. undocumented) default value, convert_fee_rate should just error out if something goes wrong, as it's fallible anyways.
oleonardolima
Metadata
Metadata
Assignees
Labels
No labels