The txpool_status
method returns the number of transactions in the pending and queued states in the transaction pool. This method provides a quick overview of the transaction pool size and network congestion without retrieving detailed transaction data.
This method requires no parameters and returns a count of transactions in each state.
Object containing counts of pending and queued transactions
Number of pending transactions (hexadecimal)
Number of queued transactions (hexadecimal)
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"pending": "0x21c",
"queued": "0xa5"
}
}
The response contains two hexadecimal values:
"0x21c"
= 540 transactions)"0xa5"
= 165 transactions)To convert hexadecimal to decimal:
"0x21c"
→ 540 (pending transactions)"0xa5"
→ 165 (queued transactions)Pending: Transactions eligible for inclusion in the next block
Have valid nonces (equal to the sender's current nonce)
Meet all other validity criteria
Ready to be mined
Queued: Transactions not yet eligible for execution
May have future nonces (higher than sender's current nonce + pending count)
May have other constraints preventing immediate execution
Waiting for prerequisites to be met
The transaction pool counts can indicate network congestion:
Pending Count | Queued Count | Network Status |
---|---|---|
< 100 | < 50 | Low activity |
100-500 | < 100 | Normal activity |
500-2000 | 100-500 | High activity |
> 2000 | > 500 | Network congestion |
Note: These are approximate ranges and can vary based on network conditions.