-
Notifications
You must be signed in to change notification settings - Fork 70
[Rpcsaga] add blockhash to gettxoutproof #472
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
[Rpcsaga] add blockhash to gettxoutproof #472
Conversation
9ff7536 to
9a8bed0
Compare
|
Applied @Davidson-Souza requests and rewrote the commit message, now appears to better explain whats being done here. Refer to the PR description to read the last commit message |
9a8bed0 to
a336c21
Compare
|
Applied @Davidson-Souza s suggestions. (#472 (comment)) |
bfd35e8 to
32699d5
Compare
127f778 to
248ceef
Compare
248ceef to
19d5ff7
Compare
|
332e69d, made the command succeed exactly with cores api, you can check this by yourself. floresta-cli gettxoutproof '["5a4ebf66822b0b2d56bd9dc64ece0bc38ee7844a23ff1d7320a88c5fdb2ad3e2"]' 000000000043a8c0fd1d6f726790caa2a406010d19efd2780db27bdbbd93baf6
"01000000ba8b9cda965dd8e536670f9ddec10e53aab14b20bacad27b9137190000000000190760b278fe7b8565fda3b968b918d5fd997f993b23674c0af3b6fde300b38f33a5914ce6ed5b1b01e32f570200000002252bf9d75c4f481ebb6278d708257d1f12beb6dd30301d26c623f789b2ba6fc0e2d32adb5f8ca820731dff234a84e78ec30bce4ec69dbd562d0b2b8266bf4e5a0105"and this is from a bitcoin core node (Im using a gambiarra with jq and a public node) [nix-shell:~]$ btc-rpc gettxoutproof '["5a4ebf66822b0b2d56bd9dc64ece0bc38ee7844a23ff1d7320a88c5fdb2ad3e2"]' 000000000043a8c0fd1d6f726790caa2a406010d19efd2780db27bdbbd93baf6
{
"jsonrpc": "2.0",
"id": "curl",
"result": "01000000ba8b9cda965dd8e536670f9ddec10e53aab14b20bacad27b9137190000000000190760b278fe7b8565fda3b968b918d5fd997f993b23674c0af3b6fde300b38f33a5914ce6ed5b1b01e32f570200000002252bf9d75c4f481ebb6278d708257d1f12beb6dd30301d26c623f789b2ba6fc0e2d32adb5f8ca820731dff234a84e78ec30bce4ec69dbd562d0b2b8266bf4e5a0105"
} |
19d5ff7 to
332e69d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it and it seems to work fine. Cross checked with core and it seems right.
Some comments about the code
082929c to
adeface
Compare
d3e0c53 to
f50525d
Compare
|
Added @Davidson-Souza Suggestions on f50525d |
f50525d to
64b0536
Compare
|
Added @Davidson-Souza Suggestions on 64b0536 |
39a78fb to
ae109bd
Compare
|
signed and retriggered the buggy CI |
ae109bd to
8cf8de4
Compare
|
Noooow its done, forgot to exclude floresta-cli from |
8cf8de4 to
a7047df
Compare
4101b88 to
0dcba9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something got messed up in some rebase, because you're still changing the florestad Cargo.toml.
Everything else looks fine
a7d7a60 to
e60d583
Compare
Yes, strange... The change now is being triggered by lint, not by me. Applied @Davidson-Souza suggestions in e60d583 |
This commit present some changes for gettxoutproof, adding the optional blockhash input which will make the method interns differ, searching for the transactions inside the specified block, otherwise, the previous default behavior of getting it from the wallet cache remains. The method now receives an array of txids instead of just one. A unused #[allow(unused)] was also removed from merkle.rs Also, now named gettxoutproof, was gettxproof.
e60d583 to
aebb3ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK aebb3ac
What is the purpose of this pull request?
Which crates are being modified?
Description
Fix #378
This commit present some changes for gettxoutproof, adding the optional blockhash
input which will make the method interns differ, searching for the transactions
inside the specified block, otherwise, the previous default behavior of getting it
from the wallet cache remains. The method now receives an array of txids instead of
just one.
Also, now named gettxoutproof, was gettxproof.
A unused #[allow(unused)] was also removed from merkle.rs
Notes to the reviewers
While trying to fork and just complete #379 to accomplish one of
0.8.0 milestonesi noticed some opportunities to optimize some decisions and add two new fixes to the #378 issue. (1. and 2.)Still validating if the changes are effective and are working.
Author Checklist
just pcc(recommended but slower)just lint-features '-- -D warnings' && cargo test --releaseFinally, you are encouraged to sign all your commits (it proves authorship and guards against tampering—see How (and why) to sign Git commits and GitHub's guide to signing commits).