From #12701, a hint about importmulti inside the help for importprivkey seems useful.
[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-
kallewoof commented at 12:59 AM on March 16, 2018: member
- fanquake added the label Wallet on Mar 16, 2018
- fanquake added the label RPC/REST/ZMQ on Mar 16, 2018
-
promag commented at 1:00 AM on March 16, 2018: member
I would say "Always prefer importmulti", even for one key. IMO
importprivkeyis redundant and ideally could be deprecated. -
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
importmultican't be used yet. -
sipa commented at 1:07 AM on March 16, 2018: member
Yes, I think
importmultiis 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, ...).
-
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...andHint: use... - remove the
!..will do!
kallewoof commented at 2:53 AM on April 3, 2018:Done!
jnewbery commented at 2:10 PM on April 2, 2018: memberI 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.
[wallet] [rpc] [doc] importprivkey: hint about importmulti 4e05687153kallewoof force-pushed on Apr 3, 2018jnewbery commented at 4:15 PM on April 3, 2018: memberTested ACK 4e05687153c69bbbfe8c5281d49b76488e02d2f7 . Looks good.
MarcoFalke added the label Docs on Apr 4, 2018MarcoFalke merged this on Apr 4, 2018MarcoFalke closed this on Apr 4, 2018MarcoFalke referenced this in commit dab0d6859b on Apr 4, 2018kallewoof deleted the branch on Apr 6, 2018MarcoFalke referenced this in commit ecbbb5cafe on May 22, 2019Fabcien referenced this in commit 30bfd82fa4 on Aug 30, 2019PastaPastaPasta referenced this in commit bf172665e6 on Jul 17, 2020PastaPastaPasta referenced this in commit 9cd642b238 on Jul 17, 2020PastaPastaPasta referenced this in commit d5a5337e65 on Jul 19, 2020PastaPastaPasta referenced this in commit 86eff46078 on Jul 21, 2020gades referenced this in commit a1c22a0b59 on Jul 1, 2021MarcoFalke locked this on Sep 8, 2021 - doesn't require a blank line between
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-21 18:15 UTC
More mirrored repositories can be found on mirror.b10c.me