Uh oh!
There was an error while loading. Please reload this page.
Default to fallbacks for huge bogus values in fee estimation conversion - #430
Merged
tnull merged 2 commits intoJan 17, 2025
Merged
Conversation
tnullforce-pushed
the
2025-01-fix-potential-fee-rate-conversion-overflow
branch
from
January 15, 2025 08:42
b3fea0e to
fe61011Comparetnullforce-pushed
the
2025-01-fix-potential-fee-rate-conversion-overflow
branch
2 times, most recently
from
January 16, 2025 09:29
3534f78 to
cf7ac78Comparetnullforce-pushed
the
2025-01-fix-potential-fee-rate-conversion-overflow
branch
2 times, most recently
from
January 16, 2025 09:51
75b4733 to
715d56bComparePreviously, we would cast `FeeRate::to_sat_per_kwu` to `u32`, which however might result in `u32::max_value` being used if our fee estimation source delivers huge bogus data. Here, we make sure to use the fallback rate if we would do so otherwise.
tnullforce-pushed
the
2025-01-fix-potential-fee-rate-conversion-overflow
branch
from
January 17, 2025 08:45
715d56b to
15c3e0eComparetnull
commented
Jan 17, 2025
CollaboratorAuthor
Rebased on main after #426 landed. |
arik-so
approved these changes
Jan 17, 2025
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #426.Previously, we would cast
FeeRate::to_sat_per_kwutou32, which however might result inu32::max_valuebeing used if our fee estimation source delivers huge bogus data. Here, we make sure to use the fallback rate if we would do so otherwise.We also make sure our post-estimation adjustments could never underflow.
Both of these changes aren't super critical but make the code a bit more robust.