it's not obvious that wallet passphrase needs to be entered before importing a privkey #957

issue dooglus opened this issue on March 20, 2012
  1. dooglus commented at 2:04 AM on March 20, 2012: contributor

    I was trying to import a private key into my wallet, and kept getting a generic error message:

    $ bitcoind importprivkey $x mywallet error: {"code":-4,"message":"Error adding key to wallet"} $

    I thought maybe the key I was using was in the wrong format, or that my wallet already had the key imported. But it turned out I just needed to supply the wallet passphrase first:

    $ bitcoind walletpassphrase "$y" 60 $ bitcoind importprivkey $x mywallet $

    It would be better if the error message could be more specific: "Error adding key to locked encrypted wallet", for example.

    If I try to add the key again, I get the same error message. This time I'd prefer to see "Key already exists in wallet".

  2. SergeySagan commented at 4:36 AM on May 3, 2013: none

    I also agree with this. The messages could be much more helpful.

  3. laanwj referenced this in commit d78f35a909 on Dec 23, 2013
  4. laanwj closed this on Dec 24, 2013

  5. luke-jr referenced this in commit 4175de73d9 on Feb 12, 2014
  6. luke-jr referenced this in commit 869ea87b5d on Feb 12, 2014
  7. pooler referenced this in commit 878d5ef738 on Mar 26, 2014
  8. wtogami referenced this in commit 64885aa48d on Mar 27, 2014
  9. wtogami referenced this in commit dab55190ec on Apr 4, 2014
  10. MathyV referenced this in commit d826acdfbb on May 9, 2014
  11. sipa commented at 3:23 AM on December 21, 2016: member

    @jerobarraco Commenting on years-old issues is pointless.

  12. sipa commented at 3:29 AM on December 21, 2016: member

    @jerobarraco I still have no idea what you're trying to accomplish.

  13. luke-jr commented at 4:11 AM on December 21, 2016: member

    Nobody needs to read it. The issue was fixed years ago.

  14. sipa commented at 5:10 AM on December 21, 2016: member

    @jerobarraco Bitcoin Core hasn't produced the error mentioned here since version v0.9.0, released in march 2014.

  15. laanwj commented at 8:42 AM on December 21, 2016: member

    IF an age-old issue came back, you should open a new issue.

    I know this is closed, but you can imagine that getting here was not free, it took me time. so, i think it's just fair that someone has to read this and think about it.

    You realize that this software is mostly a volunteer effort, and without that it wouldn't exist? Any second you waste of our time could have been spent on improving the software. We owe you nothing, not even reading your posts. And pissing off people with the first message is not the way to get your support in open source software - probably not in anything. @rest Please just ignore posts like this in the future.

  16. suprnurd referenced this in commit 83f4e57087 on Dec 5, 2017
  17. ptschip referenced this in commit 4f96a47fdb on Feb 20, 2018
  18. luke-jr referenced this in commit 7880b6e759 on Dec 18, 2018
  19. Bushstar referenced this in commit cda13363d9 on Jul 30, 2019
  20. lateminer referenced this in commit 2c9f624455 on Oct 30, 2019
  21. MarcoFalke locked this on Sep 8, 2021

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 18:16 UTC

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