2019-01-12 03:32:41 +01:00
|
|
|
package watchtower
|
|
|
|
|
|
|
|
import (
|
2019-06-14 02:30:58 +02:00
|
|
|
"net"
|
|
|
|
|
2019-01-12 03:32:41 +01:00
|
|
|
"github.com/lightningnetwork/lnd/watchtower/lookout"
|
|
|
|
"github.com/lightningnetwork/lnd/watchtower/wtserver"
|
|
|
|
)
|
|
|
|
|
|
|
|
// DB abstracts the persistent functionality required to run the watchtower
|
|
|
|
// daemon. It composes the database interfaces required by the lookout and
|
|
|
|
// wtserver subsystems.
|
|
|
|
type DB interface {
|
|
|
|
lookout.DB
|
|
|
|
wtserver.DB
|
|
|
|
}
|
2019-06-14 02:30:58 +02:00
|
|
|
|
|
|
|
// AddressNormalizer is a function signature that allows the tower to resolve
|
|
|
|
// TCP addresses on clear or onion networks.
|
|
|
|
type AddressNormalizer func(addrs []string, defaultPort string,
|
|
|
|
resolver func(string, string) (*net.TCPAddr, error)) ([]net.Addr, error)
|