RPC: fix generatetoaddress failing to parse address #7797

pull mruddy wants to merge 1 commits into bitcoin:master from mruddy:generatetoaddress-fix changing 2 files +24 −1
  1. mruddy commented at 12:14 PM on April 3, 2016: contributor

    The new RPC generatetoaddress didn't seem to work for me both from the command line and from the Qt debug window console. This change makes it work for me.

    For example, I kept getting similar to this (I tried various quoting etc... too):

    ./src/bitcoin-cli -regtest -datadir=/nodes/1 generatetoaddress 1 mkESjLZW66TmHhiFX8MCaBjrhZ543PPh9a
    error: Error parsing JSON:mkESjLZW66TmHhiFX8MCaBjrhZ543PPh9a
    

    Reference: #7671

    image

  2. laanwj commented at 12:14 PM on April 3, 2016: member

    utACK

  3. laanwj added the label RPC/REST/ZMQ on Apr 3, 2016
  4. MarcoFalke commented at 12:55 PM on April 3, 2016: member

    How come the rpc test pass without this fix?

  5. laanwj commented at 12:56 PM on April 3, 2016: member

    The RPC tests don't use bitcoin-cli. At all.

  6. sipa commented at 12:57 PM on April 3, 2016: member

    The RPC tests do the conversion to JSON on the python side, I think; they don't use bitcoin-cli (which is where the bug is).

  7. laanwj commented at 1:05 PM on April 3, 2016: member

    I also think that is right: the RPC tests test the RPC server, so should be using it directly.

    Ofc it may be good to have a few separate tests for bitcoin-cli.

    Or a unit test for function RPCConvertValues that simply tests argument parsing (for various calls) in isolated fashion. That would be the most efficient way to cover this comprehensively.

  8. RPC: fix generatetoaddress failing to parse address and add unit test 60361ca481
  9. mruddy force-pushed on Apr 3, 2016
  10. mruddy commented at 2:50 PM on April 3, 2016: contributor

    added a unit test calling RPCConvertValues directly

  11. laanwj commented at 3:10 PM on April 3, 2016: member

    @mruddy That's awesome!

  12. laanwj merged this on Apr 3, 2016
  13. laanwj closed this on Apr 3, 2016

  14. laanwj referenced this in commit e662a76288 on Apr 3, 2016
  15. mruddy deleted the branch on Apr 3, 2016
  16. sickpig referenced this in commit a539999d32 on Feb 20, 2017
  17. codablock referenced this in commit 196a991392 on Sep 16, 2017
  18. codablock referenced this in commit 7585552ba7 on Sep 19, 2017
  19. codablock referenced this in commit 8059c26f1c on Dec 9, 2017
  20. codablock referenced this in commit 7e906e57c3 on Dec 19, 2017
  21. codablock referenced this in commit 7ba8612b58 on Dec 19, 2017
  22. 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: 2026-04-13 15:15 UTC

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