Skip to content

Conversation

@mruddy
Copy link
Contributor

@mruddy mruddy commented Apr 3, 2016

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

@laanwj
Copy link
Member

laanwj commented Apr 3, 2016

utACK

@maflcko
Copy link
Member

maflcko commented Apr 3, 2016

How come the rpc test pass without this fix?

@laanwj
Copy link
Member

laanwj commented Apr 3, 2016

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

@sipa
Copy link
Member

sipa commented Apr 3, 2016 via email

@laanwj
Copy link
Member

laanwj commented Apr 3, 2016

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.

@mruddy mruddy force-pushed the generatetoaddress-fix branch from 199dc2e to 60361ca Compare April 3, 2016 14:48
@mruddy
Copy link
Contributor Author

mruddy commented Apr 3, 2016

added a unit test calling RPCConvertValues directly

@laanwj
Copy link
Member

laanwj commented Apr 3, 2016

@mruddy That's awesome!

@laanwj laanwj merged commit 60361ca into bitcoin:master Apr 3, 2016
laanwj added a commit that referenced this pull request Apr 3, 2016
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)
@mruddy mruddy deleted the generatetoaddress-fix branch April 3, 2016 16:22
sickpig referenced this pull request in sickpig/BitcoinUnlimited Feb 20, 2017
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)
codablock pushed a commit to codablock/dash that referenced this pull request Dec 19, 2017
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants