I opened a full node successfully (I succeed getting data from e.g eth_getTransactionByHash). I'm trying to get all pending transactions, but I get:

> txpool.content
  pending: {},
  queued: {}
> txpool.status
  pending: 0,
  queued: 0

I tried to sync the server the best I can, but I always get 0 results. I'm running my server with:

geth console --http --http.addr <myip> --http.port "8584" --syncmode fast --cache 8096 --cache.database 100 --cache.trie 100 --cache.gc 100 --cache.snapshot 100 --cache.trie.rejournal 0h0m10s --txpool.rejournal 0h0m10s --txpool.globalslots 50000

How can I get the pending transactions?

  • Is the node fully synced? Has it enough peers? Does it change if you use the default txpool parameters?
    – Ismael
    Jun 12 '21 at 3:15
  • @Ismael I tried to run it with --syncmode full as well, didn't help, net.peersCount gives 16. What are the default txpool parameters? Jun 13 '21 at 7:01
  • If the node is fully synced I don't know what the problem would be. You can increase the verbosity level and look at the logs for clues.
    – Ismael
    Jun 13 '21 at 19:26

The problem may be that you're not enabling the txpool API, you can do so with the following flag:

--http.api personal,eth,net,web3,txpool

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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