-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: add coverage for invalid parameters for rescanblockchain
#25906
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
test: add coverage for invalid parameters for rescanblockchain
#25906
Conversation
aureleoules
left a comment
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 32cd1441d7e178b14ff63154585eaf0f38104cae - i verified this case was not tested.
Maybe outside the scope of this PR but this also seems to be untested.
bitcoin/src/wallet/rpc/transactions.cpp
Lines 896 to 899 in 2bd9aa5
| // We can't rescan beyond non-pruned blocks, stop and throw an error | |
| if (!pwallet->chain().hasBlocks(pwallet->GetLastBlockHash(), start_height, stop_height)) { | |
| throw JSONRPCError(RPC_MISC_ERROR, "Can't rescan beyond pruned data. Use RPC call getblockchaininfo to determine your pruned height."); | |
| } |
w0xlt
left a comment
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 32cd144
Cool, I can work on it for other PR. Thanks |
32cd144 to
bd47bb5
Compare
|
Force pushed addressing @kristapsk's review. |
kristapsk
left a comment
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 bd47bb56681b0cc0b0c49e9b4e7f3d6e2ae5ad3e
w0xlt
left a comment
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.
reACK bd47bb5
But there is a lint error in CI.
bd47bb5 to
d1a0004
Compare
Thanks, @w0xlt. It was fixed in last force-pushed. |
w0xlt
left a comment
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.
reACK d1a0004
CI error in Win64 native [vs2022] check seems unrelated.
…escanblockchain` d1a0004 test: add coverage for invalid parameters for `rescanblockchain` (brunoerg) Pull request description: This PR adds test coverage for the following errors: https://github.com/bitcoin/bitcoin/blob/2bd9aa5a44b88c866c4d98f8a7bf7154049cba31/src/wallet/rpc/transactions.cpp#L880-L894 ACKs for top commit: w0xlt: reACK bitcoin@d1a0004 Tree-SHA512: c357fbda3d261e4d06a29d2a5350482db5f97a815adf59abdac1971eb19b69cfd4d54e4d21836851e2e3b116aa2a820ea1437c7aededf86b06df435cca16ac90
This PR adds test coverage for the following errors:
bitcoin/src/wallet/rpc/transactions.cpp
Lines 880 to 894 in 2bd9aa5