Repository navigation
Conversation
…k instead of funding at 0 sat/vB
This branch has not been deployed
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 free
to 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.
When mempool.space can't be reached, GetMempoolRecommendedFeesAsync returns a MempoolRecommendedFees with every fee at 0, and GetFeesByType handed that 0 back as a real rate. Callers only fall back on null, so a channel open was funded at 0 sat/vB: the change output took the whole difference and LND refused the PSBT with "input amount sum must be larger than output amount sum". The min/max feerate checks scale with that same rate, so they let it through.
GetFeesByType now returns null for any rate that isn't above zero, so every caller takes the fallback it already has: the request's own fee rate, then NBXplorer's estimate. That covers channel opens and BitcoinService withdrawals, which had the same hole; WithdrawalRequestService already guarded <= 0 on its own. In FeeRateSelector the custom value now starts at 1 sat/vB instead of 0 when mempool is down.
Nothing changes while mempool answers. No unit test: the path needs MEMPOOL_ENDPOINT, which the test project never sets.