mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-08 20:28:04 +02:00
lnwallet: propagate API change for AddrWithKey + pass in AuxSweeper
This commit is contained in:
parent
207ff3f611
commit
0027da8732
@ -191,6 +191,10 @@ type AuxComponents struct {
|
||||
// AuxContractResolver is an optional interface that can be used to
|
||||
// modify the way contracts are resolved.
|
||||
AuxContractResolver fn.Option[lnwallet.AuxContractResolver]
|
||||
|
||||
// AuxSweeper is an optional interface that can be used to modify the
|
||||
// way sweep transaction are generated.
|
||||
AuxSweeper fn.Option[lnwallet.AuxContractResolver]
|
||||
}
|
||||
|
||||
// DefaultWalletImpl is the default implementation of our normal, btcwallet
|
||||
|
11
server.go
11
server.go
@ -522,7 +522,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
dbs.DecayedLogDB, cc.ChainNotifier,
|
||||
)
|
||||
sphinxRouter := sphinx.NewRouter(
|
||||
nodeKeyECDH, cfg.ActiveNetParams.Params, replayLog,
|
||||
nodeKeyECDH, netParams, replayLog,
|
||||
)
|
||||
|
||||
writeBufferPool := pool.NewWriteBuffer(
|
||||
@ -1101,8 +1101,10 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
})
|
||||
|
||||
s.sweeper = sweep.New(&sweep.UtxoSweeperConfig{
|
||||
FeeEstimator: cc.FeeEstimator,
|
||||
GenSweepScript: newSweepPkScriptGen(cc.Wallet, s.cfg.ActiveNetParams.Params),
|
||||
FeeEstimator: cc.FeeEstimator,
|
||||
GenSweepScript: newSweepPkScriptGen(
|
||||
cc.Wallet, s.cfg.ActiveNetParams.Params,
|
||||
),
|
||||
Signer: cc.Wallet.Cfg.Signer,
|
||||
Wallet: newSweeperWallet(cc.Wallet),
|
||||
Mempool: cc.MempoolNotifier,
|
||||
@ -1625,8 +1627,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
|
||||
br, err := lnwallet.NewBreachRetribution(
|
||||
channel, commitHeight, 0, nil,
|
||||
implCfg.AuxLeafStore,
|
||||
implCfg.AuxContractResolver,
|
||||
implCfg.AuxLeafStore, implCfg.AuxSweeper,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user