0

The listunspent Bitcoin Core RPC method by default works only for addresses loaded in the wallet. Does it work for any address if the node has full index (txindex=1)?

(Technically it could I think, but since this is a 'wallet' RPC, it may be restricted.)

1 Answer 1

1

Correct, this is a wallet RPC, so it only deals with outputs belonging to the wallet.

If you want to query the entire unspent transaction output set, you can use the scantxoutset RPC. It doesn't even depend on txindex=1.

2
  • I have not considered scantxoutset, because it is marked experimental. It works, but I find it quite slow.
    – Adam B
    Nov 21 at 17:04
  • 1
    It's slow because it scans through the entire UTXO set, which is currently a few gigabytes of data. Nov 21 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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