// AddNodeAsync returns an instance of a type that can be used to get the result // of the RPC at some future time by invoking the Receive function on the // returned instance. // // See AddNode for the blocking version and more details. func (c *Client) AddNodeAsync(host string, command AddNodeCommand) FutureAddNodeResult { id := c.NextID() cmd, err := btcjson.NewAddNodeCmd(id, host, string(command)) if err != nil { return newFutureError(err) } return c.sendCmd(cmd) }
// makeAddNode generates the cmd structure for addnode commands. func makeAddNode(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewAddNodeCmd("btcctl", args[0].(string), args[1].(string)) }