CKey key;
bool fCompressed;
- CSecret secret = vchSecret.GetSecret(fCompressed);
+ auto secret = vchSecret.GetSecret(fCompressed);
key.SetSecret(secret, fCompressed);
- CKeyID keyid = key.GetPubKey().GetID();
+ auto keyid = key.GetPubKey().GetID();
CBitcoinAddress addr = CBitcoinAddress(keyid);
{
LOCK2(cs_main, pwalletMain->cs_wallet);
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "It's senseless to import pubkey pair address.");
script.SetAddress(address);
} else if (IsHex(params[0].get_str())) {
- std::vector<unsigned char> data(ParseHex(params[0].get_str()));
+ auto data = ParseHex(params[0].get_str());
script = CScript(data.begin(), data.end());
} else
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Novacoin address or script");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Pubkey pair addresses aren't supported.");
script.SetAddress(address);
} else if (IsHex(params[0].get_str())) {
- std::vector<unsigned char> data(ParseHex(params[0].get_str()));
+ auto 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");
EnsureWalletIsUnlocked();
- string strAddress = params[0].get_str();
+ auto strAddress = params[0].get_str();
CBitcoinAddress address;
if (!address.SetString(strAddress))
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid NovaCoin address");
EnsureWalletIsUnlocked();
- string strAddress = params[0].get_str();
+ auto strAddress = params[0].get_str();
SecureString strPassKey;
strPassKey.reserve(100);
strPassKey = params[2].get_str().c_str();
"importmalleablekey <Key data>\n"
"Imports the private key pair into your wallet.\n");
-
EnsureWalletIsUnlocked();
CMalleableKey mKey;