[Inspection] debug_setHead
Sets the current head of the local chain by block number.
WARNING: This API is not yet implemented and always returns "not yet implemented API" error.
NOTE: This is a destructive action and may severely damage your chain. Use with extreme caution.
JSONRPC: debug_setHead
Request
- application/json
Body
method stringrequired
Default value: debug_setHead
Method name
id int64required
Default value: 1
Request ID, Random or Auto incrementation
jsonrpc stringrequired
Default value: 2.0
JSON-RPC Version (2.0)
params number[]
The block number in hexadecimal string.
Responses
- 200
Return "not yet implemented API" error.
- application/json
- Schema
- Example (from schema)
Schema
jsonrpc stringrequired
Default value: 2.0
id int64required
error
object
result string
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": null
}
- curl
- python
- nodejs
- java
- CURL
curl -L -X POST 'http://localhost:8551/debug/blockchainInspection/setHead' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"method": "debug_setHead",
"id": 1,
"jsonrpc": "2.0",
"params": [
"0x100"
]
}'
ResponseClear