8000 Add getnetworkinfo support to btcctl. by dajohi · Pull Request #171 · btcsuite/btcd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add getnetworkinfo support to btcctl. #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions util/btcctl/btcctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ var commandHandlers = map[string]*handlerData{
"getmininginfo": {0, 0, displayJSONDump, nil, makeGetMiningInfo, ""},
"getnetworkhashps": {0, 2, displayGeneric, []conversionHandler{toInt, toInt}, makeGetNetworkHashPS, "[blocks height]"},
"getnettotals": {0, 0, displayJSONDump, nil, makeGetNetTotals, ""},
"getnetworkinfo": {0, 0, displayJSONDump, nil, makeGetNetworkInfo, ""},
"getnewaddress": {0, 1, displayGeneric, nil, makeGet 6EFB NewAddress, "[account]"},
"getpeerinfo": {0, 0, displayJSONDump, nil, makeGetPeerInfo, ""},
"getrawchangeaddress": {0, 0, displayGeneric, nil, makeGetRawChangeAddress, ""},
Expand Down Expand Up @@ -452,6 +453,11 @@ func makeGetNetworkHashPS(args []interface{}) (btcjson.Cmd, error) {
return cmd, nil
}

// makeGetNetworkInfo generates the cmd structure for getnetworkinfo commands.
func makeGetNetworkInfo(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewGetNetworkInfoCmd("btcctl")
}

// makeGetNetTotals generates the cmd structure for getnettotals commands.
func makeGetNetTotals(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewGetNetTotalsCmd("btcctl")
Expand Down
0