Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add z_listutxos method #6737

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

buck54321
Copy link
Contributor

z_listutxos is the zip-0032-account-compatible version of listunspent. The name z_listunspent was already taken, z_listunspent only returns shielded notes, and the return structure is incompatible with transparent outputs. listunspent takes no account argument, returns no account data, and from what I can tell, there's no appetite for modifying the legacy APIs for zip-0032 accounts.
I don't know if the "z_" prefix is appropriate. Seems like that prefix is associated variably with 1) working with shielded pools, and 2) working with zip-0032 accounts.

Partial resolution of #6679.


LOCK2(cs_main, pwalletMain->cs_wallet);

// Get the receivers for this account.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. Copy-pasta.

"\nArguments:\n"
"1. account (numeric) The account number.\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"3. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't personally see a reason for this argument to exist, but whoever added it to listunspent probably knew more than I do.

@buck54321
Copy link
Contributor Author

This PR is just a suggestion, of course. Just wanted to offer a solution to my complaints. I'd love to chat (maybe off-github) on the best way to get the info I need.

z_listutxos is the zip-0032-account-compatible version of listunspent.
The name z_listunspent was already taken, z_listunspent only returns
shielded notes, and the return structure is incompatible with
transparent outputs. listunspent takes no account argument, returns
no account data, and from what I can tell, there's no appetite for
modifying the legacy APIs for zip-0032 accounts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant