I logged both getBlock('pending').transactions.length and txpool.status.pending while the Aragon ICO was ongoing. I'm interested in seeing transactions as they are coming to my node.

The two graphs are significantly different. The txpool pending txs counts goes up well above 2000 (which is sort of the number I remember seeing on Etherscan), yet the getBlock('pending').transactions.length never goes above 500, and seems to reset to 0 once in a while.

One explanation could be that getBlock('pending').transactions give me transactions that my node has witnessed since the start of the current pending block? Is that correct?


1 Answer 1


Based on the link supplied by eth. getBlock('pending').transactions are the transactions your local node is trying to include into a block (if mining is enabled presumably). Whereas txpool.status.pending is the list of all transactions broadcasted which your node has received, but have yet to be included in a block.

In layman terms, getBlock('pending').transactions are the staged transactions your node is trying to put in a block; txpool.status.pending are blocks your node has seen that are waiting to be mined by anyone. On a new block received, if the pending transactions in the pool do get mined it looks like their status is changed from 'pending' to 'mined' and then they will get flushed from your tx pool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.