mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 10:02:05 +02:00
wtdb: rename CSessionInactive to CSessionTerminal
Since we will now change this to mean that the session should not ever be activated again.
This commit is contained in:
@@ -578,7 +578,7 @@ func (c *ClientDB) RemoveTower(pubKey *btcec.PublicKey, addr net.Addr) error {
|
||||
return ErrTowerUnackedUpdates
|
||||
}
|
||||
err := markSessionStatus(
|
||||
sessions, session, CSessionInactive,
|
||||
sessions, session, CSessionTerminal,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@@ -146,10 +146,10 @@ func (h *clientDBHarness) removeTower(pubKey *btcec.PublicKey, addr net.Addr,
|
||||
}
|
||||
|
||||
for _, session := range h.listSessions(&tower.ID) {
|
||||
require.Equal(h.t, wtdb.CSessionInactive,
|
||||
require.Equal(h.t, wtdb.CSessionTerminal,
|
||||
session.Status, "expected status for session "+
|
||||
"%v to be %v, got %v", session.ID,
|
||||
wtdb.CSessionInactive, session.Status)
|
||||
wtdb.CSessionTerminal, session.Status)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -617,7 +617,7 @@ func testTowerStatusChange(h *clientDBHarness) {
|
||||
// to inactive.
|
||||
h.removeTower(tower.IdentityKey, nil, true, nil)
|
||||
assertTowerStatus(wtdb.TowerStatusInactive)
|
||||
assertSessionStatus(wtdb.CSessionInactive)
|
||||
assertSessionStatus(wtdb.CSessionTerminal)
|
||||
|
||||
// Re-adding the tower in some way should re-active it and its session.
|
||||
h.createTower(towerAddr, nil)
|
||||
|
@@ -18,9 +18,9 @@ const (
|
||||
// used for backups.
|
||||
CSessionActive CSessionStatus = 0
|
||||
|
||||
// CSessionInactive indicates that the ClientSession is inactive and
|
||||
// cannot be used for backups.
|
||||
CSessionInactive CSessionStatus = 1
|
||||
// CSessionTerminal indicates that the ClientSession is in a terminal
|
||||
// state and cannot be used for backups.
|
||||
CSessionTerminal CSessionStatus = 1
|
||||
)
|
||||
|
||||
// ClientSession encapsulates a SessionInfo returned from a successful
|
||||
|
Reference in New Issue
Block a user