terminal: overwrite pool AgentName to litd

To indicate to the server that an account/order was created by the LiT
integrated Pool daemon, we overwrite the global AgentName variable.
This commit is contained in:
Oliver Gugger 2021-01-27 15:48:30 +01:00
parent 7fe6fc7c52
commit 26bbb77e7c
No known key found for this signature in database
GPG key ID: 8E4256593F177720

View file

@ -99,9 +99,10 @@ func (g *LightningTerminal) Run() error {
g.poolServer = pool.NewServer(g.cfg.Pool)
g.rpcProxy = newRpcProxy(g.cfg, g, getAllPermissions())
// Overwrite the loop daemon's user agent name so it sends "litd"
// instead of "loopd".
// Overwrite the loop and pool daemon's user agent name so it sends
// "litd" instead of "loopd" and "poold" respectively.
loop.AgentName = "litd"
pool.SetAgentName("litd")
// Hook interceptor for os signals.
err = signal.Intercept()