mirror of
https://github.com/LBRYFoundation/lbcd.git
synced 2025-09-10 20:49:51 +00:00
add "addnode" to btcctl
This commit is contained in:
parent
e1a02d71b3
commit
27abb0eb3e
1 changed files with 17 additions and 0 deletions
|
@ -43,6 +43,22 @@ func main() {
|
||||||
switch args[0] {
|
switch args[0] {
|
||||||
default:
|
default:
|
||||||
usage(parser)
|
usage(parser)
|
||||||
|
case "addnode":
|
||||||
|
if len(args) != 3 {
|
||||||
|
usage(parser)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
msg, err := btcjson.CreateMessage("addnode", args[1], args[2])
|
||||||
|
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 "decoderawtransaction":
|
case "decoderawtransaction":
|
||||||
if len(args) != 2 {
|
if len(args) != 2 {
|
||||||
usage(parser)
|
usage(parser)
|
||||||
|
@ -230,6 +246,7 @@ func usage(parser *flags.Parser) {
|
||||||
parser.WriteHelp(os.Stderr)
|
parser.WriteHelp(os.Stderr)
|
||||||
fmt.Fprintf(os.Stderr,
|
fmt.Fprintf(os.Stderr,
|
||||||
"\nCommands:\n"+
|
"\nCommands:\n"+
|
||||||
|
"\taddnode <ip> <add/remove/onetry>\n"+
|
||||||
"\tdecoderawtransaction <txhash>\n"+
|
"\tdecoderawtransaction <txhash>\n"+
|
||||||
"\tgetbestblockhash\n"+
|
"\tgetbestblockhash\n"+
|
||||||
"\tgetblock <blockhash>\n"+
|
"\tgetblock <blockhash>\n"+
|
||||||
|
|
Loading…
Add table
Reference in a new issue