sweep: add new AuxSweeper interface

In this commit, we add a new AuxSweeper interface. This'll take a set of
inputs, and a change addr for the sweep transaction, then optionally
return a new sweep output to be added to the sweep transaction.

We also add a new NotifyBroadcast method.  This'll be used to notify
that we're _about_ to broadcast a sweeping transaction. The set of
inputs is passed in, which allows the caller to prepare for the ultimate
broadcast of the sweeping transaction.

We also add ExtraTxOut to BumpRequest pass fees to NotifyBroadcast. This
allows the callee to know the total fee of the sweeping transaction.
This commit is contained in:
Olaoluwa Osuntokun
2024-06-03 23:06:17 -07:00
committed by Oliver Gugger
parent 3726cfa319
commit 23e99ddd4d
7 changed files with 166 additions and 62 deletions

View File

@@ -600,7 +600,7 @@ type MessageSigner interface {
type AddrWithKey struct {
lnwire.DeliveryAddress
InternalKey fn.Option[btcec.PublicKey]
InternalKey fn.Option[keychain.KeyDescriptor]
// TODO(roasbeef): consolidate w/ instance in chan closer
}