mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-05 20:32:39 +02:00
watchtower/wtdb: remove unnecessary tower load
This commit is contained in:
@@ -1023,20 +1023,14 @@ func (c *ClientDB) ListClientSessions(id *TowerID,
|
|||||||
return ErrUninitializedDB
|
return ErrUninitializedDB
|
||||||
}
|
}
|
||||||
|
|
||||||
towers := tx.ReadBucket(cTowerBkt)
|
|
||||||
if towers == nil {
|
|
||||||
return ErrUninitializedDB
|
|
||||||
}
|
|
||||||
|
|
||||||
chanIDIndexBkt := tx.ReadBucket(cChanIDIndexBkt)
|
chanIDIndexBkt := tx.ReadBucket(cChanIDIndexBkt)
|
||||||
if chanIDIndexBkt == nil {
|
if chanIDIndexBkt == nil {
|
||||||
return ErrUninitializedDB
|
return ErrUninitializedDB
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
|
||||||
|
|
||||||
// If no tower ID is specified, then fetch all the sessions
|
// If no tower ID is specified, then fetch all the sessions
|
||||||
// known to the db.
|
// known to the db.
|
||||||
|
var err error
|
||||||
if id == nil {
|
if id == nil {
|
||||||
clientSessions, err = c.listClientAllSessions(
|
clientSessions, err = c.listClientAllSessions(
|
||||||
sessions, chanIDIndexBkt, filterFn, opts...,
|
sessions, chanIDIndexBkt, filterFn, opts...,
|
||||||
|
Reference in New Issue
Block a user