revalidateblock
- workflowoperate-a-verifier·step 4 of 6Workflow: operate-a-verifier · step 4 of 6
revalidateblock "blockhash" ( timeout_ms ) Re-run external full validation for a block hash and rebuild the chain according to the result. Arguments: 1. blockhash (string, required) Block hash to revalidate 2. timeout_ms (numeric, optional, default=60000) Maximum time to wait for the validation result Result: { (json object) "blockhash" : "hex", (string) Validated block hash "validation_status" : "str", (string) Validation result: full_green|full_amber|full_red "chain_action" : "str" (string) Chain handling: accepted|invalidated_amber|invalidated_red } Examples: > bitcoin-cli revalidateblock "<blockhash>" > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "revalidateblock", "params": ["<blockhash>"]}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
revalidateblock(blockhash: string, timeout_ms?: number) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"revalidateblock","params":["\"<blockhash>\"",60000]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| blockhash | string | yes | Block hash to revalidate |
| timeout_ms | number | — | Maximum time to wait for the validation result |
Result
Type: any
{ (json object) "blockhash" : "hex", (string) Validated block hash "validation_status" : "str", (string) Validation result: full_green|full_amber|full_red "chain_action" : "str" (string) Chain handling: accepted|invalidated_amber|invalidated_red }
Source: services/core-node/bcore/src/rpc/custom.cpp:783
C++ symbol: revalidateblock