Merge pull request #4746 from wpaulino/tower-last-addr
watchtower: prevent removal of last tower addr
This commit is contained in:
5 files changed
+28
-5
No files matched your search
@@ -1125,7 +1125,10 @@ func (c *TowerClient) handleStaleTower(msg *staleTowerMsg) error {
|
||||
if err := c.cfg.DB.RemoveTower(msg.pubKey, msg.addr); err != nil {
|
||||
return err
|
||||
}
|
||||
c.candidateTowers.RemoveCandidate(tower.ID, msg.addr)
|
||||
err = c.candidateTowers.RemoveCandidate(tower.ID, msg.addr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// If an address was provided, then we're only meant to remove the
|
||||
// address from the tower, so there's nothing left for us to do.
|
||||
|
||||
Reference in new issue
Block a user