Prints events number.

Command syntax:

dag event count 
-net <net_name> 
-chain <chain_name>

Options:

-net - name of the Cellframe network. The list of networks can be found in the <Config_dir> \ etc \ network folder folder or received by the Cellframe-Node-Cli Net List command
-chain - the name of Chain. The list of chain can be found in the directory <Config_dir> \ etc \ network \ <network_name> or get the Cellframe-Node-App Net List Chains command

CLI Example

Command:

cellframe-node-cli dag event count 
-net riemann 
-chain zerochain

Response:

riemann.zerochain:

4 in round.new

28 atoms(s) in events

0 atom(s) in threshold

JSON-RPC Example

JSON-RPC Request - DAG EVENT COUNT

Prints events number.

Request Structure

JSON object:

{
  "method": "dag",
  "subcommand": ["event","count"],
  "arguments": {
    "net": "network_name",
    "chain": "chain_name",
  },
  "id": "1"
}

Parameters: net (network_name) - 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 make a request in the Cellframe network, use parameter chain:zerochain.

Curl Example

Request:

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

Response:

{
  "type"2,
  "result": [
    {
      "net name""riemann",
      "chain""zerochain",
      "event count in round new"0,
      "atom in events"589,
      "atom in threshold"0
    }
  ],
  "id"1
}
Link to original