Fix syntax for `getindexinfo` params in help examples #22430

pull ghost wants to merge 1 commits into bitcoin:master from changing 1 files +1 −1
  1. ghost commented at 4:33 PM on July 11, 2021: none

    txindex without quotes:

    $ curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": [txindex]}' -H 'content-type: text/plain;' http://127.0.0.1:18333/
    
    
    
    {"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
    

    txindex with quotes:

    $ curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": ["txindex"]}' -H 'content-type: text/plain;' http://127.0.0.1:18333/
    
    
    
    {"result":{"txindex":{"synced":true,"best_block_height":2032943}},"error":null,"id":"curltest"}
    
  2. Fix syntax for params in help examples e0aa8def3f
  3. DrahtBot added the label RPC/REST/ZMQ on Jul 11, 2021
  4. klementtan approved
  5. klementtan commented at 12:28 PM on July 12, 2021: contributor

    ACK e0aa8de

    tested:

    $ ./src/bitcoin-cli -signet help getindexinfo
    ...
    Examples:
    > bitcoin-cli getindexinfo
    > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
    > bitcoin-cli getindexinfo txindex
    > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": ["txindex"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
    
  6. unknown closed this on Jul 12, 2021

  7. DrahtBot locked this on Aug 16, 2022
Contributors

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:14 UTC

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