forked from lightningdevkit/ldk-node
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow empty fee estimates on Mainnet
We generally want to properly be able to detect whenever a fee estimation would fail, as we need to fail startup if we can't retrieve the latest fee rates. However, currently the `convert_fee_estimates` function would fallback to a default of 1sat/vbyte if the retrieved estimate map is empty. This is fine/potentially needed for, e.g., Signet where Esplora's `fee-estimates` endpoint would return an empty dictionary. However, we need to detect the empty map and fail our fee estimation if we encounter such a case, rather than using the 1 sat/vbyte fallback on mainnet, where differences in fee estimation could lead to costly force-closures. Here we do this and just return a `FeerateEstimationFailed` if we hit such a case.
- Loading branch information
Showing
2 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters