`importprivkey` always gives warning about already having script #16711

issue laanwj opened this issue on August 24, 2019
  1. laanwj commented at 2:42 PM on August 24, 2019: member

    Using the RPC command importprivkey always gives a warning message in the log about already having the script, even if the key is not yet known. Repro when the key is not known yet:

    $ src/bitcoind -regtest -daemon
    $ src/bitcoin-cli -regtest importprivkey cPRXsaa4WtDYmyvhT7KjT5hEJvNWndyXphTmHn2J6BYhxLt8cREn
    $ tail $HOME/.bitcoin/regtest/debug.log
    …
    2019-08-24T14:33:58Z [default wallet] Already have script 0014d75ad18779e20b8c6e0d6b28dee92ef4069dd2cb, skipping
    

    When the key is already known:

    2019-08-24T14:41:33Z [default wallet] Already have key with pubkey 0327d77baf35f9aadb9fa84ebb87d2b5a56386164a4a86119e919bd65aec52a150, skipping
    2019-08-24T14:41:33Z [default wallet] Already have script 0014d75ad18779e20b8c6e0d6b28dee92ef4069dd2cb, skipping
    
  2. laanwj added the label Wallet on Aug 24, 2019
  3. laanwj added the label good first issue on Aug 24, 2019
  4. maflcko added this to the milestone 0.19.0 on Aug 24, 2019
  5. maflcko added the label RPC/REST/ZMQ on Aug 24, 2019
  6. qubicorn cross-referenced this on Aug 26, 2019 from issue wallet: Remove redundant wpkh script import by qubicorn
  7. laanwj removed this from the milestone 0.19.0 on Sep 26, 2019
  8. laanwj removed the label good first issue on Sep 26, 2019
  9. laanwj commented at 11:46 AM on September 26, 2019: member

    Removing the milestone here and "Good First Issue" label. Solving this issue doesn't seem as simple as could be expected (it goes deeper than just logging, or redundant calls to functions), see #16724 for discussion.

  10. jarolrod cross-referenced this on Feb 23, 2021 from issue Error: This wallet has no available keys (code -4) by chaihahaha
  11. jarolrod cross-referenced this on Feb 23, 2021 from issue wallet: importprivkey fails to import private key by jarolrod
  12. maflcko commented at 10:22 AM on September 2, 2022: member

    Is this still an issue, given that legacy wallets are deprecated and importprivkey is only supported on legacy wallets?

  13. achow101 commented at 11:13 PM on October 26, 2022: member

    Closing as there is little support for working on fixing non-critical issues in legacy wallets.

  14. achow101 closed this on Oct 26, 2022

  15. bitcoin locked this on Oct 26, 2023

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-05-19 06:54 UTC