lnwallet: add whoseCommit to FetchLeavesFromCommit
This is useful for additional context to know which commit the AuxLeafStore is fetching the leaves for.
This commit is contained in:
5 files changed
+13
-8
No files matched your search
+6
-4
@@ -666,6 +666,7 @@ func (lc *LightningChannel) diskCommitToMemCommit(
|
||||
return s.FetchLeavesFromCommit(
|
||||
NewAuxChanState(lc.channelState), *diskCommit,
|
||||
*commitKeys.GetForParty(whoseCommit),
|
||||
whoseCommit,
|
||||
)
|
||||
},
|
||||
).Unpack()
|
||||
@@ -1834,7 +1835,7 @@ func (lc *LightningChannel) restorePendingLocalUpdates(
|
||||
func(s AuxLeafStore) fn.Result[CommitDiffAuxResult] {
|
||||
return s.FetchLeavesFromCommit(
|
||||
NewAuxChanState(lc.channelState), pendingCommit,
|
||||
*pendingRemoteKeys,
|
||||
*pendingRemoteKeys, lntypes.Remote,
|
||||
)
|
||||
},
|
||||
).Unpack()
|
||||
@@ -3154,7 +3155,7 @@ func genRemoteHtlcSigJobs(keyRing *CommitmentKeyRing,
|
||||
leafStore, func(s AuxLeafStore) fn.Result[CommitDiffAuxResult] {
|
||||
return s.FetchLeavesFromCommit(
|
||||
NewAuxChanState(chanState), *diskCommit,
|
||||
*keyRing,
|
||||
*keyRing, lntypes.Remote,
|
||||
)
|
||||
},
|
||||
).Unpack()
|
||||
@@ -4740,7 +4741,7 @@ func genHtlcSigValidationJobs(chanState *channeldb.OpenChannel,
|
||||
leafStore, func(s AuxLeafStore) fn.Result[CommitDiffAuxResult] {
|
||||
return s.FetchLeavesFromCommit(
|
||||
NewAuxChanState(chanState), *diskCommit,
|
||||
*keyRing,
|
||||
*keyRing, lntypes.Local,
|
||||
)
|
||||
},
|
||||
).Unpack()
|
||||
@@ -6727,7 +6728,7 @@ func NewUnilateralCloseSummary(chanState *channeldb.OpenChannel, //nolint:funlen
|
||||
leafStore, func(s AuxLeafStore) fn.Result[CommitDiffAuxResult] {
|
||||
return s.FetchLeavesFromCommit(
|
||||
NewAuxChanState(chanState), remoteCommit,
|
||||
*keyRing,
|
||||
*keyRing, lntypes.Remote,
|
||||
)
|
||||
},
|
||||
).Unpack()
|
||||
@@ -7949,6 +7950,7 @@ func NewLocalForceCloseSummary(chanState *channeldb.OpenChannel,
|
||||
return s.FetchLeavesFromCommit(
|
||||
NewAuxChanState(chanState),
|
||||
chanState.LocalCommitment, *keyRing,
|
||||
lntypes.Local,
|
||||
)
|
||||
},
|
||||
).Unpack()
|
||||
|
||||
Reference in new issue
Block a user