Ethereum
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Ethereum
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
debug_getBadBlocks reports the blocks a geth-style Ethereum node tried to import but rejected as invalid. On Ethereum mainnet (chain ID 1, native coin ETH), every proposed block must pass execution-layer validation before it joins the canonical chain; anything that fails — a bad state root, an unexecutable transaction, a header that breaks the rules — gets discarded and recorded here. Call it over the TheRPC endpoint at https://ethereum.therpc.io/YOUR_API_KEY. The response is the running list of those rejected blocks observed since the node last started, each carrying its hash, decoded header, and raw RLP bytes for inspection.
Este método não aceita parâmetros. Passe um array vazio [].
| Tipo | Descrição |
|---|---|
| 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 Ethereum playground.
| Código | Mensagem | Causa |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node, or client does not implement this method. |
-32601 instead of implementing it.