Skip to content

Conversation

@asmit27rai
Copy link
Contributor

@asmit27rai asmit27rai commented Mar 12, 2025

What is the purpose of this pull request?

  • New feature

Which crates are being modified?

  • floresta-watch-only

Description

This PR adds a new RPC command listdescriptors to Floresta, enabling users to retrieve a list of all descriptors currently being used by the node. This is particularly useful for preventing duplicate descriptor entries when adding new descriptors via the loaddescriptor command.

Fixes: #403

Changes:

  • Added a new method get_descriptors to the AddressCache struct to fetch descriptors from the wallet.
  • Implemented the listdescriptors RPC command in the RpcImpl struct.
  • Integrated the new command into the JSON-RPC handler.
  • Ensured descriptors persist across node restarts by retrieving them from the wallet.

- Implemented a new RPC command `listdescriptors` to retrieve all descriptors from the wallet.
- Added a method `get_descriptors` to the `AddressCache` struct to fetch descriptors.
- Integrated the new RPC command into the JSON-RPC handler.
- Ensured descriptors persist across node restarts by retrieving them from the wallet.

This change allows users to view previously added descriptors, preventing duplicate entries when adding new descriptors.
@asmit27rai
Copy link
Contributor Author

@Davidson-Souza Pls review this PR

@Davidson-Souza
Copy link
Member

Great job! One small thing missing is adding this command on the cli side inside floresta-cli.

@asmit27rai
Copy link
Contributor Author

asmit27rai commented Mar 12, 2025

@Davidson-Souza listdescriptors command added to Floresta CLI
Please Review the PR

Copy link
Member

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

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

Just some small coding quality changes and we are ready to go.

@asmit27rai
Copy link
Contributor Author

@Davidson-Souza Pls Review...

@asmit27rai
Copy link
Contributor Author

@Davidson-Souza Pls Check again i just fix a linting error

@asmit27rai
Copy link
Contributor Author

@Davidson-Souza A gentle reminder...

Copy link
Member

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

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

ACK 82a5a01

@Davidson-Souza Davidson-Souza merged commit 9a16d92 into vinteumorg:master Mar 17, 2025
8 checks passed
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.

[Enhancement] RPC command to list added descriptors

2 participants