Use default confirmations for single-funded channel #3013
Merged
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.
For single-funded channels where we are the funder, we previously only waited for 1 confirmation before marking the funding transaction as confirmed. This is fine because we trust ourselves to not double-spend our own channels.
However, in #2969, we started assigning the
short_channel_id
when we consider the funding transaction confirmed, and not after 6 blocks. We thus now risk creating ashort_channel_id
after only 1 confirmation, which is too early in case a reorg happens. This wouldn't cause loss of funds because we would create invalidchannel_update
s and the channel would likely not be usable.