Author

Topic: watch new Tx in mempool (testnet) (Read 938 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
January 08, 2016, 03:26:54 PM
#3
UPDATE: no answer ?
I do not think there is any way to do this. Bitcoin Core has a few notification things that it can do but not for every new transaction you receive. You can have it for every new block and transaction relevant to you (so not when a new transaction is added to the mempool). You could modify the source code and add that function in yourself though.
member
Activity: 65
Merit: 16
January 08, 2016, 11:18:46 AM
#2
UPDATE: no answer ?
member
Activity: 65
Merit: 16
December 17, 2015, 09:00:21 AM
#1
I'm developping a wallet and I want to listen to the mempool (testnet) for incoming transactions.
I run a node on the same computer so I ping bitcoind every 1 sec with getmempoolinfo.

If getmempoolinfo.size is greater that 1 sec ago, it means there is at least one new transaction
in the mempool, then I get the array of all Tx in the mempool with getrawmempool.

My question : It seems that the new Tx hash is inserted anywhere in the array.
Is there a way to avoid comparing the old rawmempool (~ 1000 Tx) with the new rawmempool
to figure which Tx are new ? Or: why the new Tx are not append at the end
or at the beginning of the array ?
Jump to: