Skip to content

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
Member

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