I'm trying to write a program in Go to watch pending transactions, using a geth full node that I'm connected to over websockets. I'm pretty sure I have to use the github.com/ethereum/go-ethereum/eth/filters package to create a new event system, on which I can then call SubscribePendingTxs, but I don't know what I should use as the backend.
[Ethereum] Monitoring pending transactions with Go
filtersgo-ethereumgolang
Best Answer
This is how you do it if you want to make two type of calls at the same time, via Ethereum client and raw RPC (web):
This code snippet I am using it to scan events, but for pending logs it should be similar. Try to make it work over HTTP first, then switching the medium to web service should be trivial.