mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
Merge pull request #2194 from xsb/num-inactive-chan-reorder
lnrpc: reorder num_inactive_channels
This commit is contained in:
commit
157d181a66
@ -1585,7 +1585,39 @@ func getInfo(ctx *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
printRespJSON(resp)
|
||||
// We print a struct that mimics the proto definition of GetInfoResponse
|
||||
// but has a better ordering for the same list of fields.
|
||||
printJSON(struct {
|
||||
Version string `json:"version"`
|
||||
IdentityPubkey string `json:"identity_pubkey"`
|
||||
Alias string `json:"alias"`
|
||||
NumPendingChannels uint32 `json:"num_pending_channels"`
|
||||
NumActiveChannels uint32 `json:"num_active_channels"`
|
||||
NumInactiveChannels uint32 `json:"num_inactive_channels"`
|
||||
NumPeers uint32 `json:"num_peers"`
|
||||
BlockHeight uint32 `json:"block_height"`
|
||||
BlockHash string `json:"block_hash"`
|
||||
BestHeaderTimestamp int64 `json:"best_header_timestamp"`
|
||||
SyncedToChain bool `json:"synced_to_chain"`
|
||||
Testnet bool `json:"testnet"`
|
||||
Chains []string `json:"chains"`
|
||||
Uris []string `json:"uris"`
|
||||
}{
|
||||
Version: resp.Version,
|
||||
IdentityPubkey: resp.IdentityPubkey,
|
||||
Alias: resp.Alias,
|
||||
NumPendingChannels: resp.NumPendingChannels,
|
||||
NumActiveChannels: resp.NumActiveChannels,
|
||||
NumInactiveChannels: resp.NumInactiveChannels,
|
||||
NumPeers: resp.NumPeers,
|
||||
BlockHeight: resp.BlockHeight,
|
||||
BlockHash: resp.BlockHash,
|
||||
BestHeaderTimestamp: resp.BestHeaderTimestamp,
|
||||
SyncedToChain: resp.SyncedToChain,
|
||||
Testnet: resp.Testnet,
|
||||
Chains: resp.Chains,
|
||||
Uris: resp.Uris,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user