Skip to content

Commit 7bc6eb2

Browse files
committed
terminal: allow lnd GetState RPC on Wallet Ready
1 parent a616e97 commit 7bc6eb2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

terminal.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,14 @@ func (g *LightningTerminal) Run() error {
233233
return fmt.Errorf("could not create permissions manager")
234234
}
235235

236+
lndOverrideMap := map[string]func() bool{
237+
"/lnrpc.State/GetState": func() bool {
238+
return g.walletReady
239+
},
240+
}
241+
236242
// Register LND, LiT and Accounts with the status manager.
237-
g.statusMgr.RegisterAndEnableSubServer(subservers.LND, nil)
243+
g.statusMgr.RegisterAndEnableSubServer(subservers.LND, lndOverrideMap)
238244
g.statusMgr.RegisterAndEnableSubServer(subservers.LIT, nil)
239245
g.statusMgr.RegisterSubServer(subservers.ACCOUNTS, nil)
240246

0 commit comments

Comments
 (0)