From e1a02d71b314ac876c0f2e5ebb2e73b808bf8240 Mon Sep 17 00:00:00 2001 From: David Hill Date: Mon, 21 Oct 2013 13:26:40 -0400 Subject: [PATCH] add getpeerinfo to btcctl --- util/btcctl/btcctl.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index 779769c0..7253b276 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -156,6 +156,18 @@ func main() { break } 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": msg, err := btcjson.CreateMessage("getrawmempool") if err != nil { @@ -226,6 +238,7 @@ func usage(parser *flags.Parser) { "\tgetconnectioncount\n"+ "\tgetdifficulty\n"+ "\tgetgenerate\n"+ + "\tgetpeerinfo\n"+ "\tgetrawmempool\n"+ "\tgetrawtransaction \n"+ "\tstop\n")