:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
Hi, Is there any way to listen to the mempool of my local ganache node?
I tried to use web3.eth.subscribe('pendingTransactions', function (error, result) {...}) but it's not working as expected. Usually, when we do that under geth it will print out the tx info(tx hash, if we use web3.eth.getTransaction to get the tx it will also give us other info without block number, block hash, because the tx is not mined) as soon as a tx enters the mempool. But under ganache, it only printout the full tx info(tx hash, block number and block hash) when the tx is mined.
So is there any way to listen to ganache's mempool and get pending tx's info?
Hi, Is there any way to listen to the mempool of my local ganache node?
I tried to use
web3.eth.subscribe('pendingTransactions', function (error, result) {...})
but it's not working as expected. Usually, when we do that under geth it will print out the tx info(tx hash, if we useweb3.eth.getTransaction
to get the tx it will also give us other info without block number, block hash, because the tx is not mined) as soon as a tx enters the mempool. But under ganache, it only printout the full tx info(tx hash, block number and block hash) when the tx is mined.So is there any way to listen to ganache's mempool and get pending tx's info?