Looks for block which contains specified datum.

Command syntax:

block find 
-net <net_name> 
-chain <chain_name>  
-datum <datum_hash>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-chain - the name of Chain. The list of chains can be found in the directory <Config_dir> \ etc \ network \ <network_name> or by the Cellframe-Node-CLI using command - net list chains
-datum - hash of the datum (in the HEX format)

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

CLI Example

Command:

cellframe-node-cli block find 
-net raiden 
-chain main
-datum 0x8994F73EFCF82AC4FAEC823C761EF86BF01FCA90A94ED89A2CDE254B209EC5E3 

Response:

  Blocks:
0x31770B9BA8B838067EDA6ABA5A0C2B88FEF611945E249C9AEB3640AE873E0E4E
        Total: 1

JSON-RPC Example

JSON-RPC Request - BLOCK FIND

Looks for block which contains specified datum.

Request Structure

JSON object:

{
  "method": "block",
  "subcommand": "find",
  "arguments": {
    "net": "network_name",
    "chain": "chain_name",
    "datum": "datum_hash"
  },
  "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) datum - the hash of the datum (HEX format)

If you make a request 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": "find",
  "arguments": {
    "net": "riemann",
    "chain": "main",
    "datum": "0x9117BD88275DF91C01F4BACD9AFEA1049408754231752D61EB4E4C716DB6381F"
  },
  "id": "1"
}'

Response:

{
  "type": 2,
  "result": [
    {
      "Blocks": [
        "0x8811272C4E7D36E56194E4773202322C6773306BDFB0BB4AD0BF43A9E328E5A4"
      ],
      "Total": 1
    }
  ],
  "id": 1
}
Link to original