mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-08 14:09:33 +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
|
// AuxContractResolver is an optional interface that can be used to
|
||||||
// modify the way contracts are resolved.
|
// modify the way contracts are resolved.
|
||||||
AuxContractResolver fn.Option[lnwallet.AuxContractResolver]
|
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
|
// 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,
|
dbs.DecayedLogDB, cc.ChainNotifier,
|
||||||
)
|
)
|
||||||
sphinxRouter := sphinx.NewRouter(
|
sphinxRouter := sphinx.NewRouter(
|
||||||
nodeKeyECDH, cfg.ActiveNetParams.Params, replayLog,
|
nodeKeyECDH, netParams, replayLog,
|
||||||
)
|
)
|
||||||
|
|
||||||
writeBufferPool := pool.NewWriteBuffer(
|
writeBufferPool := pool.NewWriteBuffer(
|
||||||
@ -1101,8 +1101,10 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
})
|
})
|
||||||
|
|
||||||
s.sweeper = sweep.New(&sweep.UtxoSweeperConfig{
|
s.sweeper = sweep.New(&sweep.UtxoSweeperConfig{
|
||||||
FeeEstimator: cc.FeeEstimator,
|
FeeEstimator: cc.FeeEstimator,
|
||||||
GenSweepScript: newSweepPkScriptGen(cc.Wallet, s.cfg.ActiveNetParams.Params),
|
GenSweepScript: newSweepPkScriptGen(
|
||||||
|
cc.Wallet, s.cfg.ActiveNetParams.Params,
|
||||||
|
),
|
||||||
Signer: cc.Wallet.Cfg.Signer,
|
Signer: cc.Wallet.Cfg.Signer,
|
||||||
Wallet: newSweeperWallet(cc.Wallet),
|
Wallet: newSweeperWallet(cc.Wallet),
|
||||||
Mempool: cc.MempoolNotifier,
|
Mempool: cc.MempoolNotifier,
|
||||||
@ -1625,8 +1627,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
|
|
||||||
br, err := lnwallet.NewBreachRetribution(
|
br, err := lnwallet.NewBreachRetribution(
|
||||||
channel, commitHeight, 0, nil,
|
channel, commitHeight, 0, nil,
|
||||||
implCfg.AuxLeafStore,
|
implCfg.AuxLeafStore, implCfg.AuxSweeper,
|
||||||
implCfg.AuxContractResolver,
|
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user