Replace CBitcoinSecret with {Encode,Decode}Secret

This commit is contained in:
Pieter Wuille
2017-09-19 16:49:52 -07:00
committed by Jack Grigg
parent b1d2a69908
commit f146029b0a
8 changed files with 58 additions and 98 deletions

View File

@@ -400,12 +400,10 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& strInput)
for (size_t 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);
}