[rpc] fix verbose argument for getblock in bitcoin-cli #10747

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:fix_getblock_verbose_argument changing 1 files +1 −0
  1. jnewbery commented at 11:23 am on July 5, 2017: member

    Using the verbose option with getblock in bitcoin-cli has been broken since #8704:

    0→ bitcoin-cli -named getblock blockhash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 verbose=true
    1error code: -1
    2error message:
    3JSON value is not a boolean as expected
    4
    5→ bitcoin-cli -named getblock blockhash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 verbosity=true
    6{
    7  "hash": "0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206",
    8...
    

    In general, I think that adding aliases because some people find argument names distasteful is a bad idea since it leads to subtle bugs like this.

    However, that functionality has already been merged in so I’m not going to try to undo it. This is the simplest fix for restoring the previous behavior. @achow101 @luke-jr

  2. [rpc] fix verbose argument for getblock in bitcoin-cli 58e9864083
  3. fanquake added the label RPC/REST/ZMQ on Jul 5, 2017
  4. jonasschnelli commented at 4:18 pm on July 5, 2017: contributor

    I agree, we should not allow aliases (If possible, something API compatibility could require it) . Should we then get completely rid of the alias here: https://github.com/bitcoin/bitcoin/blob/master/src/rpc/blockchain.cpp#L1542

    The alias in general works, it’s just the bitcoin-cli’s JSON string-to-bool conversion that failed.

  5. achow101 commented at 4:32 pm on July 5, 2017: member
    utACK 58e9864083118b538a46124f034c18dd582f4209
  6. TheBlueMatt commented at 6:29 pm on July 5, 2017: member
    Not to blow a small fix into a big change, but is it possible to more easily ensure we dont break this stuff in the future (also generally issues in having typos between the server registration and client registration here scares me cause most of it is untested). Maybe the easiest way is to just add a python or bash script that checks for consistency ala our documentation-required-for-options checks?
  7. jnewbery commented at 6:45 pm on July 5, 2017: member

    is it possible to more easily ensure we dont break this stuff in the future

    Yes, absolutely agree that there should be better testing (bitcoin-cli seems to be entirely untested). Can we open an issue to track that and treat this as a quick fix for the recent regression?

  8. TheBlueMatt commented at 6:53 pm on July 5, 2017: member
    @jnewbery fair enough. utACK 58e9864083118b538a46124f034c18dd582f4209
  9. luke-jr commented at 7:39 pm on July 5, 2017: member
    The alias isn’t about taste, but compatibility. bitcoin-cli is essentially just a testing tool, so I don’t think it needs to itself be compatible (but I don’t mind either).
  10. laanwj commented at 3:50 pm on July 10, 2017: member
    utACK 58e9864
  11. laanwj merged this on Jul 10, 2017
  12. laanwj closed this on Jul 10, 2017

  13. laanwj referenced this in commit 9edda0c5f5 on Jul 10, 2017
  14. MarcoFalke referenced this in commit 4ae6d0fbef on Aug 24, 2017
  15. MarcoFalke referenced this in commit 7fcd61b261 on Sep 13, 2017
  16. PastaPastaPasta referenced this in commit 7d2071be71 on Jul 6, 2019
  17. PastaPastaPasta referenced this in commit a8d72849de on Jul 8, 2019
  18. PastaPastaPasta referenced this in commit 9baf3ea975 on Jul 9, 2019
  19. PastaPastaPasta referenced this in commit e86c66d4a9 on Jul 11, 2019
  20. PastaPastaPasta referenced this in commit b1ce031bd4 on Jul 13, 2019
  21. PastaPastaPasta referenced this in commit bfdb5d4598 on Jul 17, 2019
  22. PastaPastaPasta referenced this in commit c813d8b6e5 on Jul 17, 2019
  23. PastaPastaPasta referenced this in commit 6e2f77933f on Jul 18, 2019
  24. PastaPastaPasta referenced this in commit f524b78783 on Sep 19, 2019
  25. PastaPastaPasta referenced this in commit 78c04e8126 on Sep 23, 2019
  26. PastaPastaPasta referenced this in commit 94b9944a06 on Sep 24, 2019
  27. PastaPastaPasta referenced this in commit 095eb5d1cf on Sep 24, 2019
  28. codablock referenced this in commit 1adc2001a8 on Sep 24, 2019
  29. PastaPastaPasta referenced this in commit 7085b31845 on Dec 21, 2019
  30. PastaPastaPasta referenced this in commit e411886030 on Jan 2, 2020
  31. PastaPastaPasta referenced this in commit a14339e4f4 on Jan 4, 2020
  32. PastaPastaPasta referenced this in commit eb4fece37d on Jan 4, 2020
  33. PastaPastaPasta referenced this in commit c442648c19 on Jan 10, 2020
  34. PastaPastaPasta referenced this in commit 55d0336348 on Jan 10, 2020
  35. PastaPastaPasta referenced this in commit 3ca3c65897 on Jan 10, 2020
  36. PastaPastaPasta referenced this in commit 872204e0a2 on Jan 12, 2020
  37. barrystyle referenced this in commit 32e1cc03d2 on Jan 22, 2020
  38. barrystyle referenced this in commit e8bcd62ce1 on Jan 22, 2020
  39. ckti referenced this in commit f18f4dc2bf on Mar 28, 2021
  40. DrahtBot locked this on Sep 8, 2021

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: 2024-11-17 18:12 UTC

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