Skip to content

Commit

Permalink
[command] add _connection field to CLI info response
Browse files Browse the repository at this point in the history
this allows the info command to show the node that returned the
response

Signed-off-by: Christopher Hall <hsw@bitmark.com>
  • Loading branch information
hxw committed Jul 24, 2019
1 parent d71db0a commit 040e271
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions command/bitmark-cli/rpccalls/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ func (client *Client) GetBitmarkInfo() (*rpc.InfoReply, error) {
}

// GetBitmarkInfoCompat - request status from bitmarkd (any version)
func (client *Client) GetBitmarkInfoCompat() (*interface{}, error) {
var reply interface{}
func (client *Client) GetBitmarkInfoCompat() (map[string]interface{}, error) {
var reply map[string]interface{}
if err := client.client.Call("Node.Info", rpc.InfoArguments{}, &reply); err != nil {
return nil, err
}

return &reply, nil
return reply, nil
}
1 change: 1 addition & 0 deletions command/bitmark-cli/run-bitmarkdinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func runBitmarkdInfo(c *cli.Context) error {
if nil != err {
return err
}
response["_connection"] = m.config.Connections[m.connectionOffset]

printJson(m.w, response)

Expand Down

0 comments on commit 040e271

Please sign in to comment.