-
Notifications
You must be signed in to change notification settings - Fork 13
/
info.go
30 lines (24 loc) · 849 Bytes
/
info.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: ISC
// Copyright (c) 2014-2019 Bitmark Inc.
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package rpccalls
import (
"github.com/bitmark-inc/bitmarkd/rpc"
)
// GetBitmarkInfo - request status from bitmarkd (must be matching version)
func (client *Client) GetBitmarkInfo() (*rpc.InfoReply, error) {
var reply rpc.InfoReply
if err := client.client.Call("Node.Info", rpc.InfoArguments{}, &reply); err != nil {
return nil, err
}
return &reply, nil
}
// GetBitmarkInfoCompat - request status from bitmarkd (any version)
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
}