Commit Graph

5 Commits

Author SHA1 Message Date
Oliver Gugger
7dfe4018ce
multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Oliver Gugger
5917486dc9
channel_notifier: keep chan in SCB on local foce close
In case we force close a channel from our end the funds can be time
locked for up to 2 weeks worst case. If something happens to our node in
that time, we don't have any information on that channel anymore because
currently the channel is removed from the channel backup file the moment
the commitment transaction confirms.
Instead we want to keep the channel around in the SCB file until we've
actually swept the time locked funds.

It looks like lnd even supports recovering from such a case if the peer
is still online and can tell us what commit height to use for deriving
the commit point. If the peer isn't around anymore then external tools
could be used to brute force the commit height.
2021-08-09 13:55:33 +02:00
Oliver Gugger
d8c62c37a8
channel_notifier: update backup on pending chan
To fix the discrepancy between getting the channel backups via
RPC where all pending channels are included, we also update the
channel.backup file on disk whenever we get a pending channel
event notification.
2020-03-04 10:58:49 +01:00
Johan T. Halseth
b53899c43c
lnd: rename package main->lnd 2019-04-23 20:57:33 +02:00
Olaoluwa Osuntokun
411000dbbc
lnd: add new channelNotifier impl of chanbackup.ChannelNotifier
In this commit, we add the channelNotifier, and implementation fo the
chanbackup.ChannelNotifier interface. This will be our bridge from the
channelnotifier.ChannelNotifier sturct within lnd, and the interface
abstraction that the chanbackup.SubSwapper accpets. The role of this new
struct is simple: proxy the messages from the
channelnotifier.ChannelNotifier to the chanbackup.SubSwapper in a format
that it understands.

Along the way we introduce a tiny interface such that we don't need to
depend on the the channledb package.
2019-03-28 17:53:31 -07:00