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

Fix mismatch between floresta-cli command and florestad server #303

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

lucasbalieiro
Copy link
Contributor

This PR resolves an issue where floresta-cli was sending a getrawtransaction command while florestad expected a gettransaction command.

The solution updates floresta-cli to use the gettransaction command, aligning it with the Bitcoin reference implementation as outlined in the Bitcoin RPC documentation for the gettransaction command:

Get detailed information about in-wallet transaction <txid>

Changes made:

  1. Updated the Methods::GetRawTransaction enum variant to Methods::GetTransaction in main.rs.
  2. Renamed the corresponding command attribute from getrawtransaction to gettransaction.
  3. Fixed the FlorestaRPC implementation to call the correct method (gettransaction) in rpc.rs.
  4. Updated the README.md documentation to reflect the new command name.
  5. Updated comments in rpc_types.rs and related files to ensure consistent terminology across the codebase.

Impact:

  • Ensures consistency between floresta-cli and florestad.
  • Adopts Bitcoin's standard naming conventions, enhancing developer familiarity.
  • Improves documentation and clarity for future maintainers.

Testing Plan:

Manual Testing:

  1. Verified gettransaction calls work correctly using floresta-cli, returning expected results for valid transaction IDs.
  2. Confirmed error handling for invalid or nonexistent transaction IDs.

Automated Testing:

  • Ran all existing tests to confirm no regressions.
  • Verified that documentation and comments now align with the updated command name.

Closes:

#301

@Davidson-Souza
Copy link
Collaborator

ACK c090240

@Davidson-Souza Davidson-Souza merged commit 2221c32 into vinteumorg:master Dec 9, 2024
6 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.

2 participants