Geth – How to Get Pending Transactions from Geth (Ropsten Testnet)

go-ethereum

I'm using Ropsten (revival) testnet with geth.
I can see that all blocks are the same as
https://ropsten.etherscan.io/
But I cannot see the pending transactions.

From https://ropsten.etherscan.io/txsPending
there are about 16 pending transactions but when I do

> eth.pendingTransactions

with geth, I get and empty list: []

How can I get the list of pending transactions ?

Best Answer

eth.pendingTransactions only lists the transactions that you have issued. If you want to look at pending transactions for the whole network, check out txpool

Specifically, txpool.inspect gives you a nice shorthand view. From there you can use eth.getTransaction(txid) for any individual transaction that you want to know more about.

Related Topic