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

[RPC] listaddresses doesn't include mining addresses #863

Closed
CaveSpectre11 opened this issue Nov 5, 2020 · 3 comments
Closed

[RPC] listaddresses doesn't include mining addresses #863

CaveSpectre11 opened this issue Nov 5, 2020 · 3 comments
Assignees

Comments

@CaveSpectre11
Copy link
Collaborator

Need to look into the changes of listaddresses and likely add capability to scan through the mining addresses that are in the wallet.

@Rock-N-Troll
Copy link

Rock-N-Troll commented Mar 28, 2021

It looks like there's a line in the listaddresses command:

// Only get basecoin and stealth addresses
        if (!((item.first.type() == typeid(WitnessV0KeyHash)) ||
              (item.first.type() == typeid(CStealthAddress)))) continue;

which is strange because the code is already built to handle CStealthAddress a few lines below:

if (item.first.type() == typeid(CStealthAddress)) {

so it looks like it was removed intentionally. I suspect just removing it from the continue block would fix it, but think there's some reason why it was removed in the first place.

Any input would be appreciated as it seems like the fix is simple

(I'm wrong....still investigating. stealth addresses are sv, basecoin are bv, mining starts with V which is not included)

@CaveSpectre11 CaveSpectre11 added the Dev Status: Open PR The work for this issue is done, and waiting to be merged. label Mar 28, 2021
@CaveSpectre11
Copy link
Collaborator Author

It looks like there's a line in the listaddresses command:

// Only get basecoin and stealth addresses
        if (!((item.first.type() == typeid(WitnessV0KeyHash)) ||
              (item.first.type() == typeid(CStealthAddress)))) continue;

which is strange because the code is already built to handle CStealthAddress a few lines below:

if (item.first.type() == typeid(CStealthAddress)) {

so it looks like it was removed intentionally. I suspect just removing it from the continue block would fix it, but think there's some reason why it was removed in the first place.

Any input would be appreciated as it seems like the fix is simple

Note that this cli command was added in PR #842, and the intent was to give a way to list the stealth addresses; so mining addresses weren't exactly considered; hence the Issue (I think).

The first check was to limit it to stealth and basecoin; the second was to get the information for stealth if stealth, else basecoin. So your PR appears correct to add a 3rd accepted addresstype.

codeofalltrades added a commit that referenced this issue Apr 10, 2021
6a00e1a display mining addresses in listaddresses rpc command (Rock-N-Troll)

Pull request description:

  `listaddresses` RPC command now handles mining addresses in the listaddresses command

  ![image](https://user-images.githubusercontent.com/34344520/112764551-1354d780-8fd7-11eb-8155-b7ff50a730c7.png)

  Addresses issue:  #863

Tree-SHA512: 7e79be54551b64e4a55c5ecd7c40e654579c4f98ba2f8ace846108979708441e914c20c4d436398aee528898bb94650d81eca4cd1e08cb784c57a5efb03a6903
@seanPhill seanPhill removed the Dev Status: Open PR The work for this issue is done, and waiting to be merged. label May 21, 2023
@seanPhill
Copy link
Collaborator

This issue is addressed in the merged commit of #911 [RPC] Return mining addresses in list addresses roc command.

(Cleaning up)

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

No branches or pull requests

3 participants