mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
lnwallet+channeldb: add new AuxLeafStore for dynamic aux leaves
In this commit, we add a new AuxLeafStore which can be used to dynamically fetch the latest aux leaves for a given state. This is useful for custom channel types that will store some extra information in the form of a custom blob, then will use that information to derive the new leaf tapscript leaves that may be attached to reach state.
This commit is contained in:
committed by
Oliver Gugger
parent
c36cd9298f
commit
d95c1f93f3
@@ -431,7 +431,7 @@ func (c *chainWatcher) handleUnknownLocalState(
|
||||
}
|
||||
remoteScript, _, err := lnwallet.CommitScriptToRemote(
|
||||
c.cfg.chanState.ChanType, c.cfg.chanState.IsInitiator,
|
||||
commitKeyRing.ToRemoteKey, leaseExpiry,
|
||||
commitKeyRing.ToRemoteKey, leaseExpiry, input.NoneTapLeaf(),
|
||||
)
|
||||
if err != nil {
|
||||
return false, err
|
||||
@@ -444,6 +444,7 @@ func (c *chainWatcher) handleUnknownLocalState(
|
||||
c.cfg.chanState.ChanType, c.cfg.chanState.IsInitiator,
|
||||
commitKeyRing.ToLocalKey, commitKeyRing.RevocationKey,
|
||||
uint32(c.cfg.chanState.LocalChanCfg.CsvDelay), leaseExpiry,
|
||||
input.NoneTapLeaf(),
|
||||
)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
Reference in New Issue
Block a user