Beispiel #1
0
// GetAddedNodeInfoNoDNSAsync 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 GetAddedNodeInfoNoDNS for the blocking version and more details.
func (c *Client) GetAddedNodeInfoNoDNSAsync(peer string) FutureGetAddedNodeInfoNoDNSResult {
	id := c.NextID()
	cmd, err := btcjson.NewGetAddedNodeInfoCmd(id, false, peer)
	if err != nil {
		return newFutureError(err)
	}

	return c.sendCmd(cmd)
}
Beispiel #2
0
// makeGetAddedNodeInfo generates the cmd structure for
// getaccountaddress commands.
func makeGetAddedNodeInfo(args []interface{}) (btcjson.Cmd, error) {
	// Create the getaddednodeinfo command with defaults for the optional
	// parameters.
	cmd, err := btcjson.NewGetAddedNodeInfoCmd("btcctl", args[0].(bool))
	if err != nil {
		return nil, err
	}

	// Override the optional parameter if it was specified.
	if len(args) > 1 {
		cmd.Node = args[1].(string)
	}

	return cmd, nil
}