The problem is getaccountaddress is getting deprecated and it has specific behaviour (not related to accounts) I'm relying heavily on. It gives you the same address between multiple calls as long as there are no incoming transactions…

What I'm doing essentially is calling getaccountaddress "" every time an address needs to be displayed.

The problem is getnewaddress is designed to always provide you with a new address, so I end up flooding wallet with meaningless amount of addresses that never receive anything.

I'm trying to replicate that old behaviour using labels API, but the best I've come up with is to combine getaddressesbylabel and parsing everything listtransactions outputs to find if there's an unused receive-typed address, and to generate new one if none found.

This seems both error prone and hardly scalable, because the number of addresses will potentially grow and may become very large very fast.

What are my options? Is there an API call that can be used as a replacement for getaccountaddress "" or a combination of calls?

Your Answer

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

Browse other questions tagged or ask your own question.