mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-31 17:51:33 +02:00
wtdb: supply commited update count to PostEvaluateFilterFn
In this commit, we adjust the PostEvaluateFilterFn to also take in a count representing the number of committed updates (ie, persisted un-acked updates) that the session has. This will be made use of in an upcoming commit.
This commit is contained in:
@@ -67,8 +67,8 @@ func (c *client) genSessionFilter(
|
||||
|
||||
// ExhaustedSessionFilter constructs a wtdb.ClientSessionFilterFn filter
|
||||
// function that will filter out any sessions that have been exhausted.
|
||||
func ExhaustedSessionFilter() wtdb.ClientSessionFilterFn {
|
||||
return func(session *wtdb.ClientSession) bool {
|
||||
func ExhaustedSessionFilter() wtdb.ClientSessWithNumCommittedUpdatesFilterFn {
|
||||
return func(session *wtdb.ClientSession, _ uint16) bool {
|
||||
return session.SeqNum < session.Policy.MaxUpdates
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user