What is the difference between eth.pendingTransactions
and eth.getBlock('pending').transactions
?
I have noticed that sometimes eth.pendingTransactions
have some transactions that eth.getBlock('pending').transactions
does not have.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityeth.pendingTransactions
are the transactions that your local Geth node has, that haven't been mined to a block.
eth.getBlock('pending')
is the current block your node is mining (or would be mining on). It is not a block that has been added to the blockchain. eth.getBlock('pending').transactions
are the transactions that are included in this hypothetical block.
If you are sending a transaction, you will see it first in eth.pendingTransactions
, before a miner includes it in a block.