[wallet] [rpc] [doc] importprivkey: hint about importmulti #12702

pull kallewoof wants to merge 1 commits into bitcoin:master from kallewoof:importprivkey-importmulti-hint changing 1 files +1 −0
  1. kallewoof commented at 0:59 am on March 16, 2018: member
    From #12701, a hint about importmulti inside the help for importprivkey seems useful.
  2. fanquake added the label Wallet on Mar 16, 2018
  3. fanquake added the label RPC/REST/ZMQ on Mar 16, 2018
  4. promag commented at 1:00 am on March 16, 2018: member
    I would say “Always prefer importmulti”, even for one key. IMO importprivkey is redundant and ideally could be deprecated.
  5. kallewoof commented at 1:02 am on March 16, 2018: member

    Really? Huh, okay. I don’t think that’s widely known.

    Edit: keeping as is, since there are apparently cases where importmulti can’t be used yet.

  6. sipa commented at 1:07 am on March 16, 2018: member

    Yes, I think importmulti is superior in every way, except:

    • Slightly less convenient to use (it requires redundant information, as you have to explicitly state what you want to import, and then give the keys/… to enable that).
    • Doesn’t support P2SH-P2WPKH yet.

    The latter can be fixed by just adding support for that case. The former can be improved by adding ‘default’ cases (e.g. if you prove a WIF private key, it can permit omitting the address, …).

  7. in src/wallet/rpcdump.cpp:103 in 8fb733756b outdated
     99@@ -100,6 +100,7 @@ UniValue importprivkey(const JSONRPCRequest& request)
    100         throw std::runtime_error(
    101             "importprivkey \"privkey\" ( \"label\" ) ( rescan )\n"
    102             "\nAdds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.\n"
    103+            "\nHint: use importmulti to import more than one private key!\n"
    


    jnewbery commented at 2:09 pm on April 2, 2018:

    Style nits. Feel free to ignore:

    • doesn’t require a blank line between Adds a private key... and Hint: use...
    • remove the !. . will do!

    kallewoof commented at 2:53 am on April 3, 2018:
    Done!
  8. jnewbery commented at 2:10 pm on April 2, 2018: member

    I agree that @sipa’s two points here: #12702 (comment) should be addressed, but I don’t see any harm in adding this hint until those are done.

    ACK 8fb733756bc6119958a9807d83bde1a4a99cac31 with a couple of style nits.

  9. [wallet] [rpc] [doc] importprivkey: hint about importmulti 4e05687153
  10. kallewoof force-pushed on Apr 3, 2018
  11. jnewbery commented at 4:15 pm on April 3, 2018: member
    Tested ACK 4e05687153c69bbbfe8c5281d49b76488e02d2f7 . Looks good.
  12. MarcoFalke added the label Docs on Apr 4, 2018
  13. MarcoFalke merged this on Apr 4, 2018
  14. MarcoFalke closed this on Apr 4, 2018

  15. MarcoFalke referenced this in commit dab0d6859b on Apr 4, 2018
  16. kallewoof deleted the branch on Apr 6, 2018
  17. MarcoFalke referenced this in commit ecbbb5cafe on May 22, 2019
  18. Fabcien referenced this in commit 30bfd82fa4 on Aug 30, 2019
  19. PastaPastaPasta referenced this in commit bf172665e6 on Jul 17, 2020
  20. PastaPastaPasta referenced this in commit 9cd642b238 on Jul 17, 2020
  21. PastaPastaPasta referenced this in commit d5a5337e65 on Jul 19, 2020
  22. PastaPastaPasta referenced this in commit 86eff46078 on Jul 21, 2020
  23. gades referenced this in commit a1c22a0b59 on Jul 1, 2021
  24. 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: 2024-12-19 00:12 UTC

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