Web3.js: web3.eth.getPendingTransactions() returns empty array

Created on 12 Jun 2019  路  7Comments  路  Source: ChainSafe/web3.js

Description

I want to get the list of pending transactions on the Ropsten network, but web3.eth.getPendingTransactions() returns an empty array, while I can see on EtherScan that there are several transactions yet to be mined. I tried connecting to both mine and Infura's nodes and the result is the same.

Expected behavior


Calling web3.eth.getPendingTransactions().then(console.log) should print a list of pending transactions.

Actual behavior


Calling web3.eth.getPendingTransactions().then(console.log) prints an empty array.

Steps to reproduce the behavior

  1. Import Web3
  2. Connect to Ropsten node via Ropsten or local node
  3. Call web3.eth.getPendingTransactions().then(console.log)

Error Logs

No errors are generated.

Versions

  • web3.js: 1.0.0-beta55
  • nodejs: 8.9.0
  • ethereum node: 1.8.27-stable-4bcc0a37

Most helpful comment

@nivida same issue here. Local node, getting empty array. This should be reopened

All 7 comments

The empty array isn't a wrong return value. As it looks like is Infura not providing this feature.

@nivida Actually I get an empty array using my private node, while I get null using Infura.

@nivida same issue here. Local node, getting empty array. This should be reopened

Same

Same issue.

Same issue. Personal local node, got empty array

web3.js: 1.3.1
nodejs: 12.18.3
ethereum node: 1.9.24-stable

Any tips?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TinyWJL picture TinyWJL  路  3Comments

webersson picture webersson  路  3Comments

zamoore picture zamoore  路  3Comments

ragnu picture ragnu  路  3Comments

SCBuergel picture SCBuergel  路  3Comments