watchtower/conf: abstract address normalizer to prevent import cycle

This commit is contained in:
Conner Fromknecht committed 2019-06-13 19:54:19 -07:00
1 parent db65d7ead4
commit c823878154
2 files changed
+11 -4

No files matched your search

+7
View File
@@ -1,6 +1,8 @@
package watchtower
import (
"net"
"github.com/lightningnetwork/lnd/watchtower/lookout"
"github.com/lightningnetwork/lnd/watchtower/wtserver"
)
@@ -12,3 +14,8 @@ type DB interface {
lookout.DB
wtserver.DB
}
// 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)