web3.eth.filter, will I be getting only confirmed transactions back?
When using web3.eth.filter with the
.get() method, you will receive all the past events in your current blockchain. These are "confirmed" transactions, but chain forks and reorganisations can occur that will result in the recent transactions being removed or included into a different block.
If you are using the filter
.watch() functions, you will receive transactions listed as they are included in new blocks, with
If a chain fork and reorganisation occurs, a transaction that was present in the your old chain and not present in your new chain will be listed by the filter, with
If the same transaction is later included into your new chain, your filter watch command will list the transaction with
Update: Remember to call the
.stopWatching() method after you have finished using the filter. The filters will automatically expire anyway, but it may be better to manually clean up.