watchtower: add DeleteSession method

Add a DeleteSession method to the tower client DB. This can be used to
delete a closable session along with any references to the session.
This commit is contained in:
Elle Mouton committed 2023-03-20 10:46:52 +02:00
1 parent 3577c829d3
commit e432261dab
4 files changed
+230

No files matched your search

+6
View File
@@ -99,6 +99,12 @@ type DB interface {
// marked as closable.
ListClosableSessions() (map[wtdb.SessionID]uint32, error)
// DeleteSession can be called when a session should be deleted from the
// DB. All references to the session will also be deleted from the DB.
// A session will only be deleted if it was previously marked as
// closable.
DeleteSession(id wtdb.SessionID) error
// RegisterChannel registers a channel for use within the client
// database. For now, all that is stored in the channel summary is the
// sweep pkscript that we'd like any tower sweeps to pay into. In the