RPC: improve SFFO arg parsing, error catching and coverage #30844

pull furszy wants to merge 2 commits into bitcoin:master from furszy:2024_rpc_wallet_sffo_duplicates changing 2 files +38 −28
  1. furszy commented at 4:37 pm on September 7, 2024: member

    Following changes were made:

    1. Catch and signal error for duplicate string destinations.
    2. Catch and signal error for invalid value type.
    3. Catch and signal error for string destination not found in tx outputs.
    4. Improved InterpretSubtractFeeFromOutputInstructions() code organization.
    5. Added test coverage for all possible error failures.

    Also, fixed two PEP 8 warnings at the ‘wallet_sendmany.py’ file:

    • PEP 8: E302 expected 2 blank lines, found 1 at the SendmanyTest class declaration.
    • PEP 8: E303 too many blank lines (2) at skip_test_if_missing_module() and set_test_params()
  2. rpc: decouple sendtoaddress 'subtractfeefromamount' boolean parsing
    The 'subtractfeefromamount' arg is only boolean for sendtoaddress().
    Other commands should never provide it as a boolean.
    4f4cd35319
  3. RPC: improve SFFO arg parsing, error catching and coverage
    Following changes were made:
    
    1) Catch and signal error for duplicate string destinations.
    2) Catch and signal error for invalid value type.
    3) Catch and signal error for string destination not found in tx outputs.
    4) Improved 'InterpretSubtractFeeFromOutputInstructions()' code organization.
    5) Added test coverage for all possible error failures.
    
    Also, fixed two PEP 8 warnings at the 'wallet_sendmany.py' file:
    - PEP 8: E302 expected 2 blank lines, found 1 at the SendmanyTest class declaration.
    - PEP 8: E303 too many blank lines (2) at skip_test_if_missing_module() and set_test_params()
    cddcbaf81e
  4. DrahtBot commented at 4:37 pm on September 7, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/30844.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK murchandamus, naiyoma, ismaelsadeeq, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  5. DrahtBot added the label RPC/REST/ZMQ on Sep 7, 2024
  6. DrahtBot added the label CI failed on Sep 7, 2024
  7. furszy commented at 2:24 pm on September 8, 2024: member
  8. murchandamus commented at 4:22 pm on September 12, 2024: contributor

    Awesome, thanks for picking this up.

    crACK cddcbaf81e8e3d107cd321ee2c9a7fd786a8917e

  9. DrahtBot removed the label CI failed on Sep 15, 2024
  10. naiyoma commented at 7:39 pm on September 27, 2024: contributor
    TACK https://github.com/bitcoin/bitcoin/pull/30844/commits/cddcbaf81e8e3d107cd321ee2c9a7fd786a8917e Nice clean-up, as well as adding more assertions to cover additional edge cases.
  11. DrahtBot added the label CI failed on Oct 13, 2024
  12. DrahtBot removed the label CI failed on Oct 18, 2024
  13. DrahtBot added the label CI failed on Oct 22, 2024
  14. DrahtBot removed the label CI failed on Oct 25, 2024
  15. ismaelsadeeq commented at 9:48 pm on January 28, 2025: member
    Code review and Tested ACK cddcbaf81e8e3d107cd321ee2c9a7fd786a8917e
  16. achow101 commented at 9:24 pm on January 29, 2025: member
    ACK cddcbaf81e8e3d107cd321ee2c9a7fd786a8917e
  17. achow101 merged this on Jan 29, 2025
  18. achow101 closed this on Jan 29, 2025

  19. furszy deleted the branch on Jan 29, 2025
  20. sedited referenced this in commit e1405325c9 on Feb 3, 2025
  21. stickies-v referenced this in commit d760fd3dda on Mar 17, 2025
  22. stickies-v referenced this in commit cc83553352 on Mar 17, 2025
  23. stickies-v referenced this in commit 2614933f06 on Mar 17, 2025
  24. stickies-v referenced this in commit b70418c5fc on Mar 17, 2025
  25. stickies-v referenced this in commit 69f8a1fe50 on Mar 17, 2025
  26. bug-castercv502 referenced this in commit bf2e6853b0 on Sep 28, 2025
  27. bitcoin locked this on Jan 29, 2026

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-03-20 09:13 UTC

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