Skip to content

funding: don't fail if we are not able to delete the fwdPolicy#7616

Closed
positiveblue wants to merge 1 commit intolightningnetwork:masterfrom
positiveblue:fix-announceChannel
Closed

funding: don't fail if we are not able to delete the fwdPolicy#7616
positiveblue wants to merge 1 commit intolightningnetwork:masterfrom
positiveblue:fix-announceChannel

Conversation

@positiveblue
Copy link
Copy Markdown
Contributor

In #6753 we added support to custom base and fee rate fees when opening a channel. Since v0.16.0 all channels store their initial fwdPolicy even if they are using the default values. However, there is an edge case where a channel is open before migrating to >v0.16.0 but updating to +v0.16.0 before that channel gets confirmed.

For those cases we won't be able to retrieve/delete the initial fwdPolicy. In that case we need to use the default values but we also need to ensure that we do not fail when trying to read/delete the initial fwdPolicy. #7613 fixed the problem for reading, here we fix it for deleting.

In lightningnetwork#6753 we added support to custom base and fee rate fees when opening a
channel. Since v0.16.0 all channels store their initial fwdPolicy even
if they are using the default values. However, there is an edge case
where a channel is open before migrating to >v0.16.0 but updating to
+v0.16.0 before that channel gets confirmed.

For those cases we won't be able to retrieve/delete the initial
fwdPolicy. In that case we need to use the default values but we also
need to ensure that we do not fail when trying to read/delete the
initial fwdPolicy. lightningnetwork#7613 fixed the problem for reading, here we fix it
for deleting.
Comment on lines +3241 to 3243
if err != nil && !errors.Is(err, channeldb.ErrChannelNotFound) {
log.Infof("Could not delete channel fees "+
"for chanId %x.", chanID)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both these cases are just logs though? not too costly to log I think

@positiveblue
Copy link
Copy Markdown
Contributor Author

Oh you are right, I did not notice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants