From bb71c496f4a0553f09dde35e3632f5772672ffe4 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 4 Apr 2024 17:48:11 -0700 Subject: [PATCH] config+serer: add AuxFundingController as top level cfg option --- config_builder.go | 7 +++++++ server.go | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config_builder.go b/config_builder.go index cbf12c3d6..aade3f96e 100644 --- a/config_builder.go +++ b/config_builder.go @@ -35,6 +35,7 @@ import ( "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/fn" + "github.com/lightningnetwork/lnd/funding" "github.com/lightningnetwork/lnd/invoices" "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/kvdb" @@ -167,6 +168,12 @@ type AuxComponents struct { // MsgRouter is an optional message router that if set will be used in // place of a new blank default message router. MsgRouter fn.Option[protofsm.MsgRouter] + + // AuxFundingController is an optional controller that can be used to + // modify the way we handle certain custom chanenl types. It's also + // able to automatically handle new custom protocol messages related to + // the funding process. + AuxFundingController fn.Option[funding.AuxFundingController] } // DefaultWalletImpl is the default implementation of our normal, btcwallet diff --git a/server.go b/server.go index d484db2e9..f7b81f2b2 100644 --- a/server.go +++ b/server.go @@ -1505,8 +1505,9 @@ func newServer(cfg *Config, listenAddrs []net.Addr, EnableUpfrontShutdown: cfg.EnableUpfrontShutdown, MaxAnchorsCommitFeeRate: chainfee.SatPerKVByte( s.cfg.MaxCommitFeeRateAnchors * 1000).FeePerKWeight(), - DeleteAliasEdge: deleteAliasEdge, - AliasManager: s.aliasMgr, + DeleteAliasEdge: deleteAliasEdge, + AliasManager: s.aliasMgr, + AuxFundingController: implCfg.AuxFundingController, }) if err != nil { return nil, err