Skip to content

Inconsistent RPC boolean validation #9802

@rock217

Description

@rock217

Describe the issue

There is a lack of consistency with RPC boolean parameter validation. Sometimes 1 == true, sometimes 1 returns an error, sometimes true==true, sometimes true returns an error.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. bitcoin-cli getrawmempool 1
  2. bitcoin-cli getrawmempool true
  3. getrawtransaction sometxid 1
  4. getrawtransaction sometxid true

Expected behaviour

Consistent behavior or type juggling so they both equate true.

Actual behaviour

  1. bitcoin-cli getrawmempool 1 //JSON value is not a boolean as expected
  2. bitcoin-cli getrawmempool true //works
  3. getrawtransaction sometxid 1 //works
  4. getrawtransaction sometxid true //JSON value is not an integer as expected

What version of bitcoin-core are you using?

0.13.2

Machine specs:

  • OS: Ubuntu 16.04
  • CPU: x86_64
  • RAM: 4GB
  • Disk size: 256GB
  • Disk Type (HD/SDD): SSD

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions