Skip to content

Commit c2648d1

Browse files
Roasbeefguggero
authored andcommitted
lnwallet: propagate API change for AddrWithKey + pass in AuxSweeper
1 parent 112cca1 commit c2648d1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

config_builder.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ type AuxComponents struct {
191191
// AuxContractResolver is an optional interface that can be used to
192192
// modify the way contracts are resolved.
193193
AuxContractResolver fn.Option[lnwallet.AuxContractResolver]
194+
195+
// AuxSweeper is an optional interface that can be used to modify the
196+
// way sweep transaction are generated.
197+
AuxSweeper fn.Option[lnwallet.AuxContractResolver]
194198
}
195199

196200
// DefaultWalletImpl is the default implementation of our normal, btcwallet

server.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,8 +1118,10 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
11181118
})
11191119

11201120
s.sweeper = sweep.New(&sweep.UtxoSweeperConfig{
1121-
FeeEstimator: cc.FeeEstimator,
1122-
GenSweepScript: newSweepPkScriptGen(cc.Wallet, s.cfg.ActiveNetParams.Params),
1121+
FeeEstimator: cc.FeeEstimator,
1122+
GenSweepScript: newSweepPkScriptGen(
1123+
cc.Wallet, s.cfg.ActiveNetParams.Params,
1124+
),
11231125
Signer: cc.Wallet.Cfg.Signer,
11241126
Wallet: newSweeperWallet(cc.Wallet),
11251127
Mempool: cc.MempoolNotifier,
@@ -1642,8 +1644,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
16421644

16431645
br, err := lnwallet.NewBreachRetribution(
16441646
channel, commitHeight, 0, nil,
1645-
implCfg.AuxLeafStore,
1646-
implCfg.AuxContractResolver,
1647+
implCfg.AuxLeafStore, implCfg.AuxSweeper,
16471648
)
16481649
if err != nil {
16491650
return nil, 0, err

0 commit comments

Comments
 (0)