[Ethereum] ‘the last add pending transaction’ in web3 filter

filterslogsmetamaskpending-transactionsweb3js

I run this code using MetaMask to inject web3 object:

var filter = web3.eth.filter('pending');
filter.watch(function (error, log) {
  console.log(log);  
});

From web3 api docs:

When using the "pending" parameter, it returns a transaction hash of the last add pending transaction.

My log looks like this:

enter image description here

I can't fing anything that would look like a transaction hash of the last add pending transaction.

I'm not sure if it's an issue with MetaMask. Could anyone running the node please run this code and post here the log?

Best Answer

From a question about pending:

Pending is the collection of transactions that can be executed by the network (that your own node knows about), but have not yet been done so.

If your node sends a transaction, you should see its transaction hash being logged. Send a second transaction, and you should see its hash.

This documentation may be clearer as: When using the "pending" parameter, it returns a transaction hash of the most recent pending transaction.

Related Topic