My question is: How can I see pending transactions in geth and how can I see my transactions at the blocks? I tried it but I can't see them?
I found the Managment API but I also can't see the pending tx
.
I also tried to check my old transactions from my wallet address and they are also not shown! Do I need to configure geth in any way? I have not changed anything in the config file!
I believe this is what you need:
eth.pendingTransactions
eth.pendingTransactions.length
Example from my Geth
To filter the transactions sent from your address, you can use this snippet:
m = 796100 // starting block, it's better not start from 0, it's time consuming
n = eth.blockNumber // the 'latest' block
for (var i = m; i < n; i++) {
var block = eth.getBlock(i, true);
for (var j = 0; j < block.transactions.length; j++) {
if (block.transactions[j].from == "0x...") {
txs.push(block.transactions[j]);
}
}
}
In below example, I want to catch all transactions sent from 0xebe78a89cecaf67bb79881d7440ba14486d21b7e
between block number 796100 to latest block (796297):
Notes: