Include a test that checks whether the first argument of scantxoutset RPC call "start" is required. The rpc call should fail if the "start" argument is not provided.
test: add coverage to rpc_scantxoutset.py #27422
pull ismaelsadeeq wants to merge 1 commits into bitcoin:master from ismaelsadeeq:2023-04-test-coverage-rpc_scantxoutset changing 1 files +3 −0-
ismaelsadeeq commented at 10:18 AM on April 5, 2023: member
-
7e3d4f8e86
test: add coverage to ensure the first arg of scantxoutset is needed
Include a test that checks whether the first argument of scantxoutset RPC call is required. The rpc call should fail if the "start" argument is not provided.
-
DrahtBot commented at 10:18 AM on April 5, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK MarcoFalke Concept ACK kevkevinpal If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot renamed this:
test: add coverage to rpc_scantxoutset.py
test: add coverage to rpc_scantxoutset.py
on Apr 5, 2023 - DrahtBot added the label Tests on Apr 5, 2023
-
kevkevinpal commented at 9:08 PM on April 7, 2023: contributor
utACK by visually looking at the code I can see 3 different options
statusabortandstartwhich requires 1 argumentbut if it doesn't get any of the above options it calls
JSONRPCErrorlink below Link to blockchain.cpp Line [#2243](/bitcoin-bitcoin/2243/) -
ismaelsadeeq commented at 10:00 PM on April 7, 2023: member
Thank you @kevkevinpal Yes if it gets an argument that is not
statusabortorstart
blockchain.cpp#L2243 is called.But
scantxoutsetaction argument is specified as RPCArg::Optional::NO blockchain.cpp#L2062. If there are no arguments scantxoutset won't be called at all. It returns the entire method help string.That is what 7e3d4f8e86e86f32d8911abd458b9e7c939ef3d5 is checking for rpc_scantxoutset.py#L124 But with the abbreviation of the method help string
"scantxoutset \"action\" ( [scanobjects,...] )" -
kevkevinpal commented at 5:19 PM on April 8, 2023: contributor
ok I see so this is a scenario where no command is entered. Should there also be a test for when something other than
startabortorstatusis entered? -
ismaelsadeeq commented at 9:40 PM on April 8, 2023: member
Yes can be something like
assert_raises_rpc_error(-8, "Invalid action 'word'", self.nodes[0].scantxoutset, "word") -
kevkevinpal commented at 4:00 PM on April 12, 2023: contributor
Yes can be something like
assert_raises_rpc_error(-8, "Invalid action 'word'", self.nodes[0].scantxoutset, "word")opened PR for this #27453 let me know if you have any comments
- fanquake requested review from josibake on Apr 17, 2023
- fanquake referenced this in commit d654c762c8 on May 2, 2023
-
fanquake commented at 12:32 PM on May 4, 2023: member
-
maflcko commented at 2:00 PM on May 4, 2023: member
lgtm ACK 7e3d4f8e86e86f32d8911abd458b9e7c939ef3d5
- sidhujag referenced this in commit 8c7fb6f42c on May 4, 2023
- fanquake merged this on May 4, 2023
- fanquake closed this on May 4, 2023
- sidhujag referenced this in commit db7d9767f8 on May 5, 2023
- ismaelsadeeq deleted the branch on Jun 27, 2024
- PastaPastaPasta referenced this in commit dd4ab444f8 on Oct 24, 2024
- PastaPastaPasta referenced this in commit 417f71a587 on Oct 25, 2024
- PastaPastaPasta referenced this in commit e12afdf175 on Oct 25, 2024
- delta1 referenced this in commit 86f74c64d2 on Jun 19, 2025
- bitcoin locked this on Jun 27, 2025