multi: thread thru the AuxLeafStore everywhere

This commit is contained in:
Oliver Gugger committed 2024-08-28 13:26:14 +02:00
1 parent 2510c19024
commit b45d72fe59
15 files changed
+194 -47

No files matched your search

+8 -1
View File
@@ -2496,9 +2496,16 @@ func initStateHints(commit1, commit2 *wire.MsgTx,
func (l *LightningWallet) ValidateChannel(channelState *channeldb.OpenChannel,
fundingTx *wire.MsgTx) error {
var chanOpts []ChannelOpt
l.Cfg.AuxLeafStore.WhenSome(func(s AuxLeafStore) {
chanOpts = append(chanOpts, WithLeafStore(s))
})
// First, we'll obtain a fully signed commitment transaction so we can
// pass into it on the chanvalidate package for verification.
channel, err := NewLightningChannel(l.Cfg.Signer, channelState, nil)
channel, err := NewLightningChannel(
l.Cfg.Signer, channelState, nil, chanOpts...,
)
if err != nil {
return err
}