Replace CBitcoinSecret with {Encode,Decode}Secret

This commit is contained in:
Pieter Wuille
2017-09-19 16:49:52 -07:00
parent ffc6e48b29
commit 32e69fa0df
9 changed files with 62 additions and 118 deletions

View File

@@ -563,12 +563,10 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) {
if (!keysObj[kidx].isStr())
throw std::runtime_error("privatekey not a std::string");
CBitcoinSecret vchSecret;
bool fGood = vchSecret.SetString(keysObj[kidx].getValStr());
if (!fGood)
CKey key = DecodeSecret(keysObj[kidx].getValStr());
if (!key.IsValid()) {
throw std::runtime_error("privatekey not valid");
CKey key = vchSecret.GetKey();
}
tempKeystore.AddKey(key);
}