Language

Choose a language

/build/rpc / btc

setnetworkactive

setnetworkactive state Disable/enable all p2p network activity. Arguments: 1. state (boolean, required) true to enable networking, false to disable Result: true|false (boolean) The value that was passed in

Signature

setnetworkactive(state: boolean) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"setnetworkactive","params":[false]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
statebooleanyestrue to enable networking, false to disable

Result

Type:  any

true|false (boolean) The value that was passed in

Source: services/core-node/bcore/src/rpc/net.cpp:878

C++ symbol: setnetworkactive