Skip to main content

disconnectnode

Command#

pacprotocol-cli disconnectnode "[address]" [nodeid]

Immediately disconnects from the specified peer node.

Strictly one out of 'address' and 'nodeid' can be provided to identify the node.

To disconnect by nodeid, either set 'address' to the empty string, or call using the named 'nodeid' argument only.

Arguments#

address#

(string, optional)

The IP address/port of the node

nodeid#

(number, optional)

The node ID (see getpeerinfo for node IDs)

Examples#

pacprotocol-cli disconnectnode "192.168.0.6:9999"
pacprotocol-cli disconnectnode "" 1
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["192.168.0.6:9999"] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/

Running following help command

pacprotocol-cli help disconnectnode

Will produce following output:

disconnectnode "[address]" [nodeid]
Immediately disconnects from the specified peer node.
Strictly one out of 'address' and 'nodeid' can be provided to identify the node.
To disconnect by nodeid, either set 'address' to the empty string, or call using the named 'nodeid' argument only.
Arguments:
1. "address" (string, optional) The IP address/port of the node
2. "nodeid" (number, optional) The node ID (see getpeerinfo for node IDs)
Examples:
> pacprotocol-cli disconnectnode "192.168.0.6:9999"
> pacprotocol-cli disconnectnode "" 1
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["192.168.0.6:9999"] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/