More precisely, I'd like to know the fastest way to get the confirmed (if the number of confirmations can be specified perfect, otherwise I'll be happy with 1) amount on each address in the wallet.
I used to get the list of (confirmed) unspent outputs with
listunspent, filter for a particular address and just sum all unspent amounts. That works great and I'm happy with the result. It is just rather slow.
I'm trying to find a faster way to get the same thing done, I thought I found my holy grail with
listaddressgroupings but then figured out that it doesn't work exactly as expected:
Say address XYZ has 1 (confirmed) BTC, if I create a transaction using unspents associated to XYZ, to send out 0.1 BTC, and I call again
listaddressgroupings I would expect to see 0.9 "remaining", but it remains 1 BTC until this transaction gets confirmed.
Any way to achieve this or I have to stick to listunspent and do the computation myself?
EDIT: My bad, I was not actually sending the transactions anymore after signing them.
listaddressgroupings then does exactly what I want.
Sorry for the noise!