diff --git a/watchtower/config.go b/watchtower/config.go index 733ebb0b..b8136682 100644 --- a/watchtower/config.go +++ b/watchtower/config.go @@ -6,6 +6,7 @@ import ( "time" "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/lightningnetwork/lnd/tor" @@ -35,6 +36,11 @@ var ( // All nil-able elements with the Config must be set in order for the Watchtower // to function properly. type Config struct { + // ChainHash identifies the chain that the watchtower will be monitoring + // for breaches and that will be advertised in the server's Init message + // to inbound clients. + ChainHash chainhash.Hash + // BlockFetcher supports the ability to fetch blocks from the network by // hash. BlockFetcher lookout.BlockFetcher diff --git a/watchtower/standalone.go b/watchtower/standalone.go index ebb3646d..f55f44cb 100644 --- a/watchtower/standalone.go +++ b/watchtower/standalone.go @@ -78,6 +78,7 @@ func New(cfg *Config) (*Standalone, error) { // Initialize the server with its required resources. server, err := wtserver.New(&wtserver.Config{ + ChainHash: cfg.ChainHash, DB: cfg.DB, NodePrivKey: cfg.NodePrivKey, Listeners: listeners,