Language

Choose a language

/build/rpc / mining

startmining

  • workflowrun-a-miner·step 5 of 6Workflow: run-a-miner · step 5 of 6

startmining "address" Start the mining thread and mine to a specified address Arguments: 1. address (string, required) The address to send the newly generated cAIsh to. Result: "str" (string) Greeting message Examples: > bitcoin-cli startmining "myaddress"

Signature

startmining(address: string) → any

Code samples

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

Parameters

NameTypeReq.Description
addressstringyesThe address to send the newly generated cAIsh to.

Result

Type:  any

"str" (string) Greeting message

Source: services/core-node/bcore/src/rpc/custom.cpp:105

C++ symbol: startmining