diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-09-19 16:49:52 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-02-19 18:55:20 -0800 |
commit | 32e69fa0df8fc1cfc8ac4f8381bc54b8f33e1c38 (patch) | |
tree | cd00b30d48911729cef8bd436797177bd8ebeb33 /src/bitcoin-tx.cpp | |
parent | ffc6e48b2983189dc0ce7de0a038e5329bc07b1b (diff) |
Replace CBitcoinSecret with {Encode,Decode}Secret
Diffstat (limited to 'src/bitcoin-tx.cpp')
-rw-r--r-- | src/bitcoin-tx.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index a9f7264f68..4770635c6a 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -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); } |