How to listsinceblock mempool transactions?

1

I am using listsinceblock RPC call to show me transactions relevant to my wallet addresses only. Absolutely useful feature, but I cannot figure out how to include also mempool transactions.

Is there something that would implement such functionality?

Thanks!

michnovka

Posted 2019-06-23T22:55:52.607

Reputation: 137

Answers

1

Currently there is no way to get this information. However Bitcoin Core does track this information (at least the block height at the time the transaction entered its mempool) so it should be possible to make such a command.

Note that listsinceblock is a wallet RPC so it cannot also work on the mempool due to the separation between the node and wallet that we are trying to make.

Andrew Chow

Posted 2019-06-23T22:55:52.607

Reputation: 40 910

thanks. is there any RPC call that works with the mempool apart from getting its size?michnovka 2019-06-24T10:08:21.350

getrawmempool gives you the txids of every transaction currently in the mempool. getmempoolentry will give you information about that transaction in the mempool, including the block height at the time the transaction entered the mempool.Andrew Chow 2019-06-24T14:10:24.017

so if I wanted to make a wrapper around this, it looks like id have to iterate through ALL these transactions and filter by receiver address. This means 1 getrawmempool + N getmempoolentry where N can be quite huge, correct?michnovka 2019-06-24T14:12:38.753

Yes. It wouldn't be very fast nor would it be atomic (i.e. you could get some information that is out of date)Andrew Chow 2019-06-24T14:13:54.400