contractcourt: update GenSweepScript to return internal key

For the upcoming aux sweeper integration, the internal key is needed for
the call backs.
This commit is contained in:
Olaoluwa Osuntokun
2024-06-23 23:30:52 -07:00
parent 9a181105e2
commit f81cd79bca
3 changed files with 19 additions and 22 deletions

View File

@ -1177,16 +1177,9 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
CloseLink: closeLink,
DB: s.chanStateDB,
Estimator: s.cc.FeeEstimator,
GenSweepScript: func() ([]byte, error) {
addr, err := newSweepPkScriptGen(
cc.Wallet, netParams,
)().Unpack()
if err != nil {
return nil, err
}
return addr.DeliveryAddress, nil
},
GenSweepScript: newSweepPkScriptGen(
cc.Wallet, s.cfg.ActiveNetParams.Params,
),
Notifier: cc.ChainNotifier,
PublishTransaction: cc.Wallet.PublishTransaction,
ContractBreaches: contractBreaches,