`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. laanwj removed this from the milestone 0.19.0 on Sep 26, 2019
  7. laanwj removed the label good first issue on Sep 26, 2019
  8. 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.

  9. 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?

  10. 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.

  11. achow101 closed this on Oct 26, 2022

  12. 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-04-13 15:14 UTC

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