-
Notifications
You must be signed in to change notification settings - Fork 38.7k
rpc, wallet: add ability to retrieve all address book entries #26174
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
Conversation
src/wallet/rpc/addresses.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to do this, you should mention that if no label is supplied then all address book entry addresses are returned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 37f809a. Thanks.
32a9f34 to
37f809a
Compare
|
Concept ~0. Seems like a hack. Code looks fine though. |
|
Concept ACK but not sure about the approach. Would it be better to create a new RPC |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Another approach would be to take a label |
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
Concept ACK. This is useful for various situations where a bunch of imported spks needs to be retrieved from the wallet. Maybe to compare with an external source and check if any new spks need to be imported into the watchlist. Previously it could be done by making redundant labels just for this call, but having this option to dump everything seems useful. I will go through the code changes in more detail. Adding one simple, functional test to check the behavior will be helpful. |
|
Concept ACK |
|
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
|
The PR didn't seem to attract much attention in the past. Also, the issue seems not important enough right now to keep it sitting around idle in the list of open PRs. Closing due to lack of interest. |
As far as I know, there is currently no way to retrieve all address book entries via RPC.
This functionality can be added by slightly modifying the
getaddressesbylabeland making thelabelparameter optional.PR:
./src/bitcoin-cli -regtest getaddressesbylabel { "bcrt1q23d9qmeqrmdfazp79e5xavpgrzqmmtjf7k2p7u": { "label": "label03", "purpose": "receive" }, "bcrt1pynqgl3mh8qmwj496nfg6ucxd8jw0wz3rz7jtf4s4v6e9zv6a4cnqdcl79k": { "label": "label02", "purpose": "receive" }, "bcrt1pty99hxsx7trd53ul7lhl4ee82ggqslyq54mg5mte5wv8nfu7xxfqcf0pzz": { "label": "label01", "purpose": "receive" } }On master branch, it is not possible to run that RPC without passing a label parameter.