Avalanche
Avalanche
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
txpool_status returns the number of pending and queued transactions in an Avalanche C-Chain node's transaction pool, as two hex-encoded integers. Pending transactions are ready for inclusion in the next block; queued ones are waiting on a nonce gap or other condition. It is the lightweight counterpart to txpool_inspect — just the totals, no per-transaction detail — which makes it ideal for cheap, frequent polling of mempool depth. On the C-Chain, the EVM chain where AVAX pays for gas under Snowman/Avalanche consensus, these counts give a quick read on congestion. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a).
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| object | Object with `pending` (hex string) and `queued` (hex string) transaction counts. |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | method not found | The node does not support the txpool namespace. |
txpool namespace is Geth-style. Avalanche C-Chain's coreth client is Geth-derived, but not every endpoint enables it, so a node without the namespace returns "method not found".