Skip to content

Commit 5c17059

Browse files
committed
Update importaddress help to push its use to script-only
1 parent a1d7df3 commit 5c17059

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/wallet/rpcdump.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,21 @@ UniValue importaddress(const UniValue& params, bool fHelp)
181181
if (fHelp || params.size() < 1 || params.size() > 4)
182182
throw runtime_error(
183183
"importaddress \"address\" ( \"label\" rescan p2sh )\n"
184-
"\nAdds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend.\n"
184+
"\nAdds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend.\n"
185185
"\nArguments:\n"
186-
"1. \"address\" (string, required) The address\n"
186+
"1. \"script\" (string, required) The hex-encoded script (or address)\n"
187187
"2. \"label\" (string, optional, default=\"\") An optional label\n"
188188
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
189189
"4. p2sh (boolean, optional, default=false) Add the P2SH version of the script as well\n"
190190
"\nNote: This call can take minutes to complete if rescan is true.\n"
191+
"If you have the full public key, you should call importpublickey instead of this.\n"
191192
"\nExamples:\n"
192-
"\nImport an address with rescan\n"
193-
+ HelpExampleCli("importaddress", "\"myaddress\"") +
193+
"\nImport a script with rescan\n"
194+
+ HelpExampleCli("importaddress", "\"myscript\"") +
194195
"\nImport using a label without rescan\n"
195-
+ HelpExampleCli("importaddress", "\"myaddress\" \"testing\" false") +
196+
+ HelpExampleCli("importaddress", "\"myscript\" \"testing\" false") +
196197
"\nAs a JSON-RPC call\n"
197-
+ HelpExampleRpc("importaddress", "\"myaddress\", \"testing\", false")
198+
+ HelpExampleRpc("importaddress", "\"myscript\", \"testing\", false")
198199
);
199200

200201
if (fPruneMode)

0 commit comments

Comments
 (0)