Avalanche
Avalanche
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
debug_getBadBlocks reports the invalid blocks that an Avalanche C-Chain node has seen and rejected since it last started. On the C-Chain — the EVM contract chain of Avalanche, where gas is paid in AVAX and the Snowman consensus engine drives fast finality — a "bad block" is one that failed validation against protocol rules and was therefore never applied to the canonical state. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, hex 0xa86a). The method returns the running list of these rejected blocks, each with its hash, decoded header, and raw RLP, so you can inspect exactly what the node refused to accept.
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| array | Array of objects, each with `{hash, block, rlp}` — `block` contains the decoded header fields and `rlp` is the raw RLP-encoded block. Returns an empty array if no bad blocks have been seen. |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node, or client does not implement this method. |
-32601 Method not found instead of an empty list.