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
  1. ismaelsadeeq commented at 10:18 AM on April 5, 2023: member

    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.

  2. 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.
    7e3d4f8e86
  3. 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.

  4. DrahtBot renamed this:
    test: add coverage to rpc_scantxoutset.py
    test: add coverage to rpc_scantxoutset.py
    on Apr 5, 2023
  5. DrahtBot added the label Tests on Apr 5, 2023
  6. kevkevinpal commented at 9:08 PM on April 7, 2023: contributor

    utACK by visually looking at the code I can see 3 different options status abort and start which requires 1 argument

    but if it doesn't get any of the above options it calls JSONRPCError link below Link to blockchain.cpp Line [#2243](/bitcoin-bitcoin/2243/)

  7. ismaelsadeeq commented at 10:00 PM on April 7, 2023: member

    Thank you @kevkevinpal Yes if it gets an argument that is not status abort or start
    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,...] )"

  8. 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 start abort or status is entered?

  9. 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")

  10. 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

  11. fanquake requested review from josibake on Apr 17, 2023
  12. fanquake referenced this in commit d654c762c8 on May 2, 2023
  13. fanquake commented at 12:32 PM on May 4, 2023: member
  14. maflcko commented at 2:00 PM on May 4, 2023: member

    lgtm ACK 7e3d4f8e86e86f32d8911abd458b9e7c939ef3d5

  15. sidhujag referenced this in commit 8c7fb6f42c on May 4, 2023
  16. fanquake merged this on May 4, 2023
  17. fanquake closed this on May 4, 2023

  18. sidhujag referenced this in commit db7d9767f8 on May 5, 2023
  19. ismaelsadeeq deleted the branch on Jun 27, 2024
  20. PastaPastaPasta referenced this in commit dd4ab444f8 on Oct 24, 2024
  21. PastaPastaPasta referenced this in commit 417f71a587 on Oct 25, 2024
  22. PastaPastaPasta referenced this in commit e12afdf175 on Oct 25, 2024
  23. delta1 referenced this in commit 86f74c64d2 on Jun 19, 2025
  24. bitcoin locked this on Jun 27, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me