multi: pass BuildBreachRetribution callback to tower client
In this commit, a new BuildBreachRetribution callback is added to the tower client's Config struct. The main LND server provides the client with an implementation of the callback.
This commit is contained in:
3 files changed
+67
-6
No files matched your search
@@ -178,6 +178,11 @@ type Config struct {
|
||||
// ChainNotifier can be used to subscribe to block notifications.
|
||||
ChainNotifier chainntnfs.ChainNotifier
|
||||
|
||||
// BuildBreachRetribution is a function closure that allows the client
|
||||
// fetch the breach retribution info for a certain channel at a certain
|
||||
// revoked commitment height.
|
||||
BuildBreachRetribution BreachRetributionBuilder
|
||||
|
||||
// NewAddress generates a new on-chain sweep pkscript.
|
||||
NewAddress func() ([]byte, error)
|
||||
|
||||
@@ -240,6 +245,12 @@ type Config struct {
|
||||
SessionCloseRange uint32
|
||||
}
|
||||
|
||||
// BreachRetributionBuilder is a function that can be used to construct a
|
||||
// BreachRetribution from a channel ID and a commitment height.
|
||||
type BreachRetributionBuilder func(id lnwire.ChannelID,
|
||||
commitHeight uint64) (*lnwallet.BreachRetribution,
|
||||
channeldb.ChannelType, error)
|
||||
|
||||
// newTowerMsg is an internal message we'll use within the TowerClient to signal
|
||||
// that a new tower can be considered.
|
||||
type newTowerMsg struct {
|
||||
|
||||
Reference in new issue
Block a user