-
Notifications
You must be signed in to change notification settings - Fork 52
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
Bug: getrawtransaction
Command Not Found in florestad
#301
Comments
AFAIK Floresta doesn't index transactions, so |
You can open a PR to change 'gettransaction' to 'getrawtransaction', seems a good change for me. Its good to follow strictly the naming conventions from bips. In other way, its exactly what @luisschwab said in the comment above. we arent indexating yet. that means we discart the blocks after validating it. |
In core, if you pass the block hash, then no need for @lucasbalieiro usually, |
TIL |
When running the
getrawtransaction
command,floresta_cli
returns an error indicating that the method is not found inflorestad
.$ ./floresta_cli getrawtransaction 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b Error: JsonRpc returned an error RPC error response: RpcError { code: -32601, message: "Method not found", data: None }
Steps to Reproduce
master
branch at commit Current HEAD: 6615959getrawtransaction
command with a valid transaction hash:Investigation
Upon reviewing the source code, I found a potential mismatch in the RPC method's name declaration.
In server.rs, the RPC method is defined as
gettransaction
instead ofgetrawtransaction
:To test, I modified the annotation:
#[rpc(name = "getrawtransaction")]
After rebuilding the project, the command returned:
$ ./floresta_cli getrawtransaction 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b Error: JsonRpc returned an error RPC error response: RpcError { code: 3, message: "Transaction not found", data: None }
This error (
Transaction not found
) seems expected because, if I understand the code correctly, the getrawtransaction RPC method only works with watch-only wallets.Clarification Needed
Since I’m not a Rust developer, I’m unsure if:
This is the intended behavior (e.g., I am using the command incorrectly), or
This is a bug that requires fixing.
Expected Behavior
getrawtransaction
command should work as documented or provide a clear explanation of its usage restrictions.Environment Details
System Information
Let me know if further clarification is needed.
The text was updated successfully, but these errors were encountered: