htlcswitch/interface: add TowerClient iface
This commit is contained in:
parent
ab4a4b77f5
commit
7566b26e03
@ -6,6 +6,7 @@ import (
|
|||||||
"github.com/lightningnetwork/lnd/invoices"
|
"github.com/lightningnetwork/lnd/invoices"
|
||||||
"github.com/lightningnetwork/lnd/lnpeer"
|
"github.com/lightningnetwork/lnd/lnpeer"
|
||||||
"github.com/lightningnetwork/lnd/lntypes"
|
"github.com/lightningnetwork/lnd/lntypes"
|
||||||
|
"github.com/lightningnetwork/lnd/lnwallet"
|
||||||
"github.com/lightningnetwork/lnd/lnwire"
|
"github.com/lightningnetwork/lnd/lnwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -159,3 +160,20 @@ type ForwardingLog interface {
|
|||||||
// visualizations, etc.
|
// visualizations, etc.
|
||||||
AddForwardingEvents([]channeldb.ForwardingEvent) error
|
AddForwardingEvents([]channeldb.ForwardingEvent) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TowerClient is the primary interface used by the daemon to backup pre-signed
|
||||||
|
// justice transactions to watchtowers.
|
||||||
|
type TowerClient interface {
|
||||||
|
// RegisterChannel persistently initializes any channel-dependent
|
||||||
|
// parameters within the client. This should be called during link
|
||||||
|
// startup to ensure that the client is able to support the link during
|
||||||
|
// operation.
|
||||||
|
RegisterChannel(lnwire.ChannelID) error
|
||||||
|
|
||||||
|
// BackupState initiates a request to back up a particular revoked
|
||||||
|
// state. If the method returns nil, the backup is guaranteed to be
|
||||||
|
// successful unless the tower is unavailable and client is force quit,
|
||||||
|
// or the justice transaction would create dust outputs when trying to
|
||||||
|
// abide by the negotiated policy.
|
||||||
|
BackupState(*lnwire.ChannelID, *lnwallet.BreachRetribution) error
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user