mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
subservers+terminal: move overwriting agent name
This commit is contained in:
parent
a3a5d636e6
commit
53d0d8432e
3 changed files with 9 additions and 8 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
restProxy "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightninglabs/loop"
|
||||
"github.com/lightninglabs/loop/loopd"
|
||||
"github.com/lightninglabs/loop/looprpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
|
|
@ -27,6 +28,10 @@ var _ SubServer = (*loopSubServer)(nil)
|
|||
func NewLoopSubServer(cfg *loopd.Config, remoteCfg *RemoteDaemonConfig,
|
||||
remote bool) SubServer {
|
||||
|
||||
// Overwrite the loop daemon's user agent name, so it sends "litd"
|
||||
// instead of "loopd".
|
||||
loop.AgentName = "litd"
|
||||
|
||||
return &loopSubServer{
|
||||
Daemon: loopd.New(cfg, nil),
|
||||
cfg: cfg,
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ var _ SubServer = (*poolSubServer)(nil)
|
|||
func NewPoolSubServer(cfg *pool.Config, remoteCfg *RemoteDaemonConfig,
|
||||
remote bool) SubServer {
|
||||
|
||||
// Overwrite the pool daemon's user agent name, so it sends "litd"
|
||||
// instead of and "poold".
|
||||
pool.SetAgentName("litd")
|
||||
|
||||
return &poolSubServer{
|
||||
Server: pool.NewServer(cfg),
|
||||
cfg: cfg,
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ import (
|
|||
"github.com/lightninglabs/lightning-terminal/session"
|
||||
"github.com/lightninglabs/lightning-terminal/subservers"
|
||||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightninglabs/loop"
|
||||
"github.com/lightninglabs/pool"
|
||||
"github.com/lightningnetwork/lnd"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
"github.com/lightningnetwork/lnd/chainreg"
|
||||
|
|
@ -1413,16 +1411,10 @@ func (g *LightningTerminal) initSubServers() {
|
|||
g.cfg.faradayRemote,
|
||||
))
|
||||
|
||||
// Overwrite the loop daemon's user agent name so it sends "litd"
|
||||
// instead of "loopd".
|
||||
loop.AgentName = "litd"
|
||||
g.subServerMgr.AddServer(subservers.NewLoopSubServer(
|
||||
g.cfg.Loop, g.cfg.Remote.Loop, g.cfg.loopRemote,
|
||||
))
|
||||
|
||||
// Overwrite the pool daemon's user agent name so it sends "litd"
|
||||
// instead of and "poold".
|
||||
pool.SetAgentName("litd")
|
||||
g.subServerMgr.AddServer(subservers.NewPoolSubServer(
|
||||
g.cfg.Pool, g.cfg.Remote.Pool, g.cfg.poolRemote,
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue