rpc: require second argument only for scantxoutset start action #17728

pull achow101 wants to merge 1 commits into bitcoin:master from achow101:fix-scantxoutset-args changing 2 files +13 −1
  1. achow101 commented at 10:23 PM on December 11, 2019: member

    It was reported on IRC that scantxoutset's API was broken in 0.19.0:

    <belcher> i think scantxoutset may have been broken in bitcoin core 0.19 ? regardless of what parameters i run it with (e.g. "scantxoutset abort", "scantxoutset status") it just returns the help doc, according to the release notes the only change was https://github.com/bitcoin/bitcoin/pull/16285/files but i dont see anything that wouldve broken it, it works fine in 0.18
    <belcher> im on regtest, in case its important
    <harding> I can confirm `scantxoutset abort` returns the help doc on latest master.  Waiting for 0.18.1 to start now to attempt to reproduce there.
    <harding> It looks like it's expecting a second parameter (even though that doesn't make sense with "abort").
    <jonatack> Same for me as well
    <harding> Can also confirm that `scantxoutset abort` returns the expected result on 0.18.1.
    

    As noted in the conversation, previously, the second argument of scanobjects is only required for the start action. Stop and abort actions did not and could work without them.

    It appears that this was broken by #16240 which enforced the size of the arguments to match the listed required arguments.

    To fix this issue, this PR makes the scanobjects argument an optional argument. Then only in the start action do we check whether the scanobjects argument is there and throw an informative error about that. Also a test is added for this case.

  2. rpc: require second argument only for scantxoutset start action
    The second argument of scanobjects is only required for the start action.
    Stop and abort actions do not need this.
    7d263571be
  3. fanquake added the label RPC/REST/ZMQ on Dec 11, 2019
  4. laanwj added the label Needs backport (0.19) on Dec 12, 2019
  5. laanwj added the label Bug on Dec 12, 2019
  6. promag commented at 10:51 AM on December 12, 2019: member

    Approach ACK.

  7. MarcoFalke commented at 3:32 PM on December 12, 2019: member

    ACK, this was introduced by me in fa0ad4e7ce8f4c19fe58bf06747bf8c62600581c

  8. MarcoFalke commented at 3:37 PM on December 12, 2019: member

    Probably because the previous documentation incorrectly labeled this as "required". See https://bitcoincore.org/en/doc/0.17.0/rpc/blockchain/scantxoutset/

  9. promag commented at 3:50 PM on December 14, 2019: member

    ACK 7d263571bee8c36fbe3c854b69c6f31cf1ee3b9b.

  10. laanwj commented at 12:06 PM on December 15, 2019: member

    ACK 7d263571bee8c36fbe3c854b69c6f31cf1ee3b9b Thank you for fixing a clearly defined bug with a clear, minimal change.

  11. laanwj referenced this in commit a595011f5a on Dec 15, 2019
  12. laanwj merged this on Dec 15, 2019
  13. laanwj closed this on Dec 15, 2019

  14. sidhujag referenced this in commit f7bd9de01a on Dec 16, 2019
  15. fanquake referenced this in commit 4d7875c555 on Jan 3, 2020
  16. luke-jr referenced this in commit de9397974f on Jan 5, 2020
  17. fanquake removed the label Needs backport (0.19) on Jan 6, 2020
  18. fanquake commented at 12:01 AM on January 6, 2020: member

    Being backported in 17858.

  19. laanwj referenced this in commit bb123c6527 on Jan 8, 2020
  20. MarkLTZ referenced this in commit 2e6abb1507 on Mar 13, 2020
  21. MarkLTZ referenced this in commit ece88bae51 on Mar 13, 2020
  22. jasonbcox referenced this in commit 2d4176409e on Nov 9, 2020
  23. sidhujag referenced this in commit 6dead92bf8 on Nov 10, 2020
  24. Munkybooty referenced this in commit 861ef02929 on Dec 9, 2021
  25. Munkybooty referenced this in commit fc6f77f098 on Dec 9, 2021
  26. Munkybooty referenced this in commit e32f0d5d86 on Dec 9, 2021
  27. PastaPastaPasta referenced this in commit a7fa9f4c7e on Dec 22, 2021
  28. PastaPastaPasta referenced this in commit 240b816f2b on Dec 22, 2021
  29. PastaPastaPasta referenced this in commit 39d1440fba on Dec 22, 2021
  30. Munkybooty referenced this in commit 16f7583e71 on Dec 23, 2021
  31. PastaPastaPasta referenced this in commit ae20d30726 on Dec 28, 2021
  32. DrahtBot locked this on Feb 15, 2022

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-13 15:14 UTC

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