lnrpc/watchtowerrpc: prevent watchtowerrpc panic when tower not active

This commit is contained in:
Conner Fromknecht
2019-07-02 22:03:16 +00:00
committed by Conner Fromknecht
parent 36983214e8
commit f727b94e12
3 changed files with 7 additions and 1 deletions

View File

@ -216,6 +216,9 @@ func (s *subRPCServerConfigs) PopulateDependencies(cc *chainControl,
case *watchtowerrpc.Config:
subCfgValue := extractReflectValue(subCfg)
subCfgValue.FieldByName("Active").Set(
reflect.ValueOf(tower != nil),
)
subCfgValue.FieldByName("Tower").Set(
reflect.ValueOf(tower),
)