lnrpc: expose network name in GetInfo
Previously only a testnet boolean was available which made it impossible to distinguish between regtest and mainnet.
This commit is contained in:
5 files changed
+661
-567
No files matched your search
+7
-2
@@ -1748,9 +1748,14 @@ func (r *rpcServer) GetInfo(ctx context.Context,
|
||||
"with current best block in the main chain: %v", err)
|
||||
}
|
||||
|
||||
activeChains := make([]string, registeredChains.NumActiveChains())
|
||||
network := normalizeNetwork(activeNetParams.Name)
|
||||
activeChains := make([]*lnrpc.Chain, registeredChains.NumActiveChains())
|
||||
for i, chain := range registeredChains.ActiveChains() {
|
||||
activeChains[i] = chain.String()
|
||||
activeChains[i] = &lnrpc.Chain{
|
||||
Chain: chain.String(),
|
||||
Network: network,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check if external IP addresses were provided to lnd and use them
|
||||
|
||||
Reference in new issue
Block a user