lnrpc: reorder fields in lncli getingo output
Move num_inactive_channels closer to num_active_channel, best_header_timestamp closer to block_hash/block_height and version as first item in the list.
This commit is contained in:
parent
d6d833c242
commit
8db3c04773
@ -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