New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC: fix generatetoaddress failing to parse address #7797

Merged
merged 1 commit into from Apr 3, 2016

Conversation

Projects
None yet
4 participants
@mruddy
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Apr 3, 2016

Member

utACK

Member

laanwj commented Apr 3, 2016

utACK

@laanwj laanwj added the RPC/REST/ZMQ label Apr 3, 2016

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Apr 3, 2016

Member

How come the rpc test pass without this fix?

Member

MarcoFalke commented Apr 3, 2016

How come the rpc test pass without this fix?

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Apr 3, 2016

Member

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

Member

laanwj commented Apr 3, 2016

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

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 3, 2016

Member
Member

sipa commented Apr 3, 2016

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Apr 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.

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

This comment has been minimized.

Show comment
Hide comment
@mruddy

mruddy Apr 3, 2016

Contributor

added a unit test calling RPCConvertValues directly

Contributor

mruddy commented Apr 3, 2016

added a unit test calling RPCConvertValues directly

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Apr 3, 2016

Member

@mruddy That's awesome!

Member

laanwj commented Apr 3, 2016

@mruddy That's awesome!

@laanwj laanwj merged commit 60361ca into bitcoin:master Apr 3, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Apr 3, 2016

Merge #7797: RPC: fix generatetoaddress failing to parse address
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)

@mruddy mruddy deleted the mruddy:generatetoaddress-fix branch Apr 3, 2016

sickpig referenced this pull request in sickpig/BitcoinUnlimited Feb 20, 2017

Merge #7797: RPC: fix generatetoaddress failing to parse address
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)

codablock added a commit to codablock/dash that referenced this pull request Sep 16, 2017

Merge #7797: RPC: fix generatetoaddress failing to parse address
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)

codablock added a commit to codablock/dash that referenced this pull request Sep 19, 2017

Merge #7797: RPC: fix generatetoaddress failing to parse address
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)

codablock added a commit to codablock/dash that referenced this pull request Dec 9, 2017

Merge #7797: RPC: fix generatetoaddress failing to parse address
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)

codablock added a commit to codablock/dash that referenced this pull request Dec 19, 2017

Merge #7797: RPC: fix generatetoaddress failing to parse address
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)

codablock added a commit to codablock/dash that referenced this pull request Dec 19, 2017

Merge #7797: RPC: fix generatetoaddress failing to parse address
60361ca RPC: fix generatetoaddress failing to parse address and add unit test (mruddy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment