sweep: create wallet interface

We need access to additional wallet functionality. This commit creates
an interface to prevent passing in multiple function pointers.
This commit is contained in:
Joost Jager committed 2019-12-17 22:00:35 +01:00
1 parent b325aae4f2
commit 34c9193bfc
5 files changed
+43 -23

No files matched your search

+4 -4
View File
@@ -792,10 +792,10 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
}
s.sweeper = sweep.New(&sweep.UtxoSweeperConfig{
FeeEstimator: cc.feeEstimator,
GenSweepScript: newSweepPkScriptGen(cc.wallet),
Signer: cc.wallet.Cfg.Signer,
PublishTransaction: cc.wallet.PublishTransaction,
FeeEstimator: cc.feeEstimator,
GenSweepScript: newSweepPkScriptGen(cc.wallet),
Signer: cc.wallet.Cfg.Signer,
Wallet: cc.wallet,
NewBatchTimer: func() <-chan time.Time {
return time.NewTimer(sweep.DefaultBatchWindowDuration).C
},