Change some Bitcoin strings to Zcash strings.
This commit is contained in:
@@ -81,10 +81,10 @@ Value importprivkey(const Array& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() < 1 || params.size() > 3)
|
||||
throw runtime_error(
|
||||
"importprivkey \"bitcoinprivkey\" ( \"label\" rescan )\n"
|
||||
"importprivkey \"zcashprivkey\" ( \"label\" rescan )\n"
|
||||
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinprivkey\" (string, required) The private key (see dumpprivkey)\n"
|
||||
"1. \"zcashprivkey\" (string, required) The private key (see dumpprivkey)\n"
|
||||
"2. \"label\" (string, optional, default=\"\") An optional label\n"
|
||||
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
|
||||
"\nNote: This call can take minutes to complete if rescan is true.\n"
|
||||
@@ -182,7 +182,7 @@ Value importaddress(const Array& params, bool fHelp)
|
||||
std::vector<unsigned char> data(ParseHex(params[0].get_str()));
|
||||
script = CScript(data.begin(), data.end());
|
||||
} else {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address or script");
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address or script");
|
||||
}
|
||||
|
||||
string strLabel = "";
|
||||
@@ -321,7 +321,7 @@ Value importwallet_impl(const Array& params, bool fHelp, bool fImportZKeys)
|
||||
}
|
||||
catch (const std::runtime_error &e) {
|
||||
LogPrint("zrpc","Importing detected an error: %s\n", e.what());
|
||||
// Not a valid spending key, so carry on and see if it's a Bitcoin style address.
|
||||
// Not a valid spending key, so carry on and see if it's a Zcash style address.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,11 +388,11 @@ Value dumpprivkey(const Array& params, bool fHelp)
|
||||
|
||||
if (fHelp || params.size() != 1)
|
||||
throw runtime_error(
|
||||
"dumpprivkey \"bitcoinaddress\"\n"
|
||||
"\nReveals the private key corresponding to 'bitcoinaddress'.\n"
|
||||
"dumpprivkey \"zcashaddress\"\n"
|
||||
"\nReveals the private key corresponding to 'zcashaddress'.\n"
|
||||
"Then the importprivkey can be used with this output\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"bitcoinaddress\" (string, required) The bitcoin address for the private key\n"
|
||||
"1. \"zcashaddress\" (string, required) The zcash address for the private key\n"
|
||||
"\nResult:\n"
|
||||
"\"key\" (string) The private key\n"
|
||||
"\nExamples:\n"
|
||||
@@ -408,7 +408,7 @@ Value dumpprivkey(const Array& params, bool fHelp)
|
||||
string strAddress = params[0].get_str();
|
||||
CBitcoinAddress address;
|
||||
if (!address.SetString(strAddress))
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
|
||||
CKeyID keyID;
|
||||
if (!address.GetKeyID(keyID))
|
||||
throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to a key");
|
||||
|
||||
Reference in New Issue
Block a user