Cryptocurrency Ethereum Mastering Development

Getting txpool with python web3 and infura

I am trying to monitor pending transactions with python web3 and an infura node. I am currently using web3.eth.getBlock(block_identifier='pending', full_transactions=True) on a loop to fetch pending transactions, but it seems to be missing some transactions and completely ignores transactions with lower gas prices.

I have tried using w3.eth.filter('pending') but that just gives an error
ValueError: {'code': -32601, 'message': 'The method eth_newPendingTransactionFilter does not exist/is not available'}

Is there any way to access the full txpool on python with an infura node?

Leave a Reply

Your email address will not be published. Required fields are marked *