waitforblock

blockchain
waitforblock "blockhash" ( timeout )

Waits for a specific new block and returns useful info about it.

Returns the current block on timeout or exit.

Make sure to use no RPC timeout (dpowcoin-cli -rpcclienttimeout=0)

Arguments:
1. blockhash    (string, required) Block hash to wait for.
2. timeout      (numeric, optional, default=0) Time in milliseconds to wait for a response. 0 indicates no timeout.

Result:
{                    (json object)
  "hash" : "hex",    (string) The blockhash
  "height" : n       (numeric) Block height
}

Examples:
> dpowcoin-cli waitforblock "d86f8a0582e779830f182befeaaabc8c73a159b6b06530910758daf17ce31e36" 1000
> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "waitforblock", "params": ["d86f8a0582e779830f182befeaaabc8c73a159b6b06530910758daf17ce31e36", 1000]}' -H 'content-type: application/json' http://127.0.0.1:42002/