add getpeerinfo to btcctl
This commit is contained in:
parent
a975b60a0a
commit
e1a02d71b3
1 changed files with 13 additions and 0 deletions
|
@ -156,6 +156,18 @@ func main() {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
fmt.Printf("%v\n", reply.(bool))
|
fmt.Printf("%v\n", reply.(bool))
|
||||||
|
case "getpeerinfo":
|
||||||
|
msg, err := btcjson.CreateMessage("getpeerinfo")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("CreateMessage: %v\n", err)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
reply, err := send(&cfg, msg)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("RpcCommand: %v\n", err)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
spew.Dump(reply)
|
||||||
case "getrawmempool":
|
case "getrawmempool":
|
||||||
msg, err := btcjson.CreateMessage("getrawmempool")
|
msg, err := btcjson.CreateMessage("getrawmempool")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -226,6 +238,7 @@ func usage(parser *flags.Parser) {
|
||||||
"\tgetconnectioncount\n"+
|
"\tgetconnectioncount\n"+
|
||||||
"\tgetdifficulty\n"+
|
"\tgetdifficulty\n"+
|
||||||
"\tgetgenerate\n"+
|
"\tgetgenerate\n"+
|
||||||
|
"\tgetpeerinfo\n"+
|
||||||
"\tgetrawmempool\n"+
|
"\tgetrawmempool\n"+
|
||||||
"\tgetrawtransaction <txhash>\n"+
|
"\tgetrawtransaction <txhash>\n"+
|
||||||
"\tstop\n")
|
"\tstop\n")
|
||||||
|
|
Loading…
Reference in a new issue