waitforblock
waitforblock (timeout)
Waits for a specific new block and returns useful info about it.
Returns the current block on timeout or exit.
Arguments:
1. "blockhash" (required, string) Block hash to wait for.
2. timeout (int, optional, default=0) Time in milliseconds to wait for a response. 0 indicates no timeout.
Result:
{ (json object)
"hash" : { (string) The blockhash
"height" : { (int) Block height
}
Examples:
> bitcoin-cli waitforblock "0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862", 1000
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "waitforblock", "params": ["0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862", 1000] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/