importaddress error (p2sh) #12824

issue doffing81 opened this issue on March 29, 2018
  1. doffing81 commented at 12:19 AM on March 29, 2018: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    I tried the rpc command: bitcoin-cli importaddress <P2SH ADDRESS> true true only to receive the error:

    error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)

    After adding empty quotes for my label parameter, a different error occurred:

    error code: -5 error message: Cannot use the p2sh flag with an address - use a script instead

    I am running 0.16.0 on Ubuntu.

    Am I not able to simply give it the address?

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. fanquake added the label RPC/REST/ZMQ on Mar 29, 2018
  3. ken2812221 commented at 9:56 AM on March 29, 2018: contributor

    try this bitcoin-cli importaddress <P2SH ADDRESS>

  4. MarcoFalke commented at 12:02 PM on March 29, 2018: member

    Is this also true on master (i.e. after #12652)?

  5. doffing81 commented at 12:29 PM on March 29, 2018: none

    @ken2812221, that did not work. I get the same "couldn't connect" error. @MarcoFalke, I guess I wouldn't know. I use the ppa to update upon new releases. Can I pull from master if I use the ppa?

  6. MarcoFalke commented at 2:57 PM on March 29, 2018: member

    I cant reproduce Are you sure the server was running? Did other calls before that call succeed?

  7. doffing81 commented at 7:07 PM on March 29, 2018: none

    Yes to both.

    Interestingly enough, even with those errors, it seemed to work?! I was simply calling 'getbalance', without any parameters, which wasn't showing me the watch-only balance, while if, and only if, I put all of the parameters in, the watch-only balance shows as well.

  8. sipa commented at 6:01 PM on November 1, 2018: member

    It doesn't make sense that getbalance works and importaddress doesn't, when invoked in the same environment.

    If bitcoin-cli can't connect to bitcoind that means something goes wrong before the RPC command is even sent, so it should be happening across all RPCs.

  9. MarcoFalke commented at 10:34 PM on May 8, 2020: member

    Is this still an issue with a recent version of Bitcoin Core? If yes, what are the steps to reproduce?

  10. MarcoFalke closed this on May 8, 2020

  11. MarcoFalke locked this on Feb 15, 2022

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