Quick way to find transaction I am running bitcoinqt on my server. Each second, I use a .NET API to query the daemon to find new transactions which contain needed addresses. (The addresses are not from the local wallet.)

So, first I do GetRawMemPool() to get list of all new transaction Ids, and then for each id I do GetRawTransaction(transactionID) and DecodeRawTransaction() to get transaction details to find out if it contains needed addresses.

The problem is that this process, querying the daemon for each transaction in the mempool, sometimes takes a lot of time, up to 1 min, since the mempool sometimes has 10-12k transactions in the pool. I think the most CPU intensive is the DecodeRawTransaction() call.

So, this method of confirming a payment is taking far too long, and is currently not acceptable for my application. I need at most 10-20 seconds.

So, is there another way to get this information faster?

(I can't use third party api like blockchain)
If you can self-compile bitcoind/Bitcoin-Qt (or find someone who can compile it for you) you could use REST:


https://github.com/bitcoin/bitcoin/pull/6013 (adds mempool information to the REST API)


Or maybe have a look at the RPC call getrawmempool true (mind the true for verbose information).