watchtower/wtclient/interface: add LoadTower and mock impl
This commit is contained in:
4 files changed
+33
-1
No files matched your search
@@ -221,6 +221,17 @@ func New(config *Config) (*TowerClient, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Reload any towers from disk using the tower IDs contained in each
|
||||
// candidate session.
|
||||
for _, s := range c.candidateSessions {
|
||||
tower, err := c.cfg.DB.LoadTower(s.TowerID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s.Tower = tower
|
||||
}
|
||||
|
||||
// Finally, load the sweep pkscripts that have been generated for all
|
||||
// previously registered channels.
|
||||
c.sweepPkScripts, err = c.cfg.DB.FetchChanPkScripts()
|
||||
|
||||
Reference in new issue
Block a user