In my local experiments so far, I don't think that scantxoutset includes mempool information. What options do I have if I want to scan the current utxo set(with mempool updates) for a particular descriptor?

1 Answer 1


As of 24.0 the only complete way (to my knowledge) of achieving this is by using a watchonly wallet along with the listunspent / listsinceblock commands.

Importing the descriptor in a watchonly wallet will allow you to query its coins as well as transactions it is involved in (those that "deposit to" it or "spend from" it). It is at the expense of having to scan the block chain first (not just the UTxO set). If you want to get updates for a descriptor that was used in the past you will have to rescan the chain starting from the birthdate of the descriptor.

Another partial solution is to combine gettxout with scantxoutset. This command queries the UTXO set for a given transaction output. It can query the UTxO set either from the view of the chain tip or from the view of the mempool (that is with all the updates from the mempool). Therefore you can get away without rescanning the block chain by calling gettxout (with include_mempool set to true, the default) on each entry return by scantxoutset to learn about coins that were spent in the mempool. But you won't know about new unconfirmed coins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.