2019-01-12 05:32:41 +03:00
|
|
|
package watchtower
|
|
|
|
|
|
|
|
import (
|
2019-06-14 03:30:58 +03:00
|
|
|
"net"
|
|
|
|
|
2019-01-12 05:32:41 +03: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 03:30:58 +03: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)
|