Counts quantity of blocks in the chain.

Request Structure

JSON object:

{
  "method": "block",
  "subcommand": "count",
  "arguments": {
    "net": "network_name",
    "chain": "chain_name"
  },
  "id": "1"
}

Parameters:

net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received using - Node Command - NET LIST chain - the name of chain (main or zerochain)

If you request command in the Cellframe network, use parameter chain:main.

Curl Example

Request:

curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '{
  "method": "block",
  "subcommand": "count",
  "arguments": {
    "net": "riemann",
    "chain": "main"
  },
  "id": "1"
}'

Response:

{
  "type"2,
  "result": [
    {
      "riemann.main has blocks - "17729
    }
  ],
  "id"1
}