Networking
P2P Related Commands.
You can use mvc-cli help command to view the usage of specific commands. The JsonRpc call method is in the example.
Commands
== Network ==
addnode "node" "add|remove|onetry"
clearbanned
disconnectnode "[address]" [nodeid]
getaddednodeinfo ( "node" )
getconnectioncount
getexcessiveblock
getnettotals
getnetworkinfo
getpeerinfo
listbanned
ping
setban "subnet" "add|remove" (bantime) (absolute)
setblockmaxsize blockSize
setexcessiveblock blockSize
setnetworkactive true|false
settxnpropagationfreq freqaddnode
Attempts add or remove a node from the addnode list. Or try a connection to a node once.
Param๏ผ
node(string, required)command(string, required)
clearbanned
Clear all banned IPs.
disconnectnode
ๆญๅผไธๆๅฎ่็น็่ฟๆฅใ
Param๏ผ
address(string, optional) ่ฆๆญๅผ่ฟๆฅ็่็น็IPๅฐๅๅ็ซฏๅฃใnodeid(string, optional) ่ฆๆญๅผ่ฟๆฅ็่็น็IDใ
getaddednodeinfo
Returns information about the given added node, or all added nodes(note that onetry addnodes are not listed here)
Param๏ผ
node(string, optional)
getconnectioncount
Returns the number of connections to other nodes.
getexcessiveblock
Return the excessive block size.
getnettotals
Returns information about network traffic, including bytes in, bytes out, and current time.
getnetworkinfo
Returns an object containing various state info regarding P2P networking.
getpeerinfo
Returns data about each connected network node as a json array of objects.
listbanned
List all banned IPs/Subnets.
ping
Requests that a ping be sent to all other nodes, to measure ping time. Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.
setban
Attempts add or remove a IP/Subnet from the banned list.
Param๏ผ
subnet(string, required)command(string, required)bantime(numeric, optional)absolute(boolean, optional)
setblockmaxsize
Sets maximum size of produced block.
Param๏ผ
blockSize(numeric, required)
setexcessiveblock
Set the excessive block size. Excessive blocks will not be used in the active chain or relayed. This discourages the propagation of blocks that you consider excessively large.
Param๏ผ
blockSize(numeric, required)
setnetworkactive
Disable/enable all p2p network activity.
Param๏ผ
state
true|false(boolean, required)
settxnpropagationfreq
Set the frequency (in milli-seconds) the transaction propagator runs at.
Param๏ผ
freq(numeric, required)