wtdb+lnrpc: return correct NumAckedUpdates from wtclientrpc

This commit is contained in:
Elle Mouton committed 2023-09-14 10:33:04 +02:00
1 parent 2a9339805e
commit 273b934f62
2 files changed
+42 -2

No files matched your search

+5
View File
@@ -390,6 +390,10 @@ func constructFunctionalOptions(includeSessions,
return opts, ackCounts, committedUpdateCounts
}
perNumRogueUpdates := func(s *wtdb.ClientSession, numUpdates uint16) {
ackCounts[s.ID] += numUpdates
}
perNumAckedUpdates := func(s *wtdb.ClientSession, id lnwire.ChannelID,
numUpdates uint16) {
@@ -405,6 +409,7 @@ func constructFunctionalOptions(includeSessions,
opts = []wtdb.ClientSessionListOption{
wtdb.WithPerNumAckedUpdates(perNumAckedUpdates),
wtdb.WithPerCommittedUpdate(perCommittedUpdate),
wtdb.WithPerRogueUpdateCount(perNumRogueUpdates),
}
if excludeExhaustedSessions {