aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-tx.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2017-09-19 16:49:52 -0700
committerPieter Wuille <[email protected]>2018-02-19 18:55:20 -0800
commit32e69fa0df8fc1cfc8ac4f8381bc54b8f33e1c38 (patch)
treecd00b30d48911729cef8bd436797177bd8ebeb33 /src/bitcoin-tx.cpp
parentMerge #10579: [RPC] Split signrawtransaction into wallet and non-wallet RPC c... (diff)
downloaddiscoin-32e69fa0df8fc1cfc8ac4f8381bc54b8f33e1c38.tar.xz
discoin-32e69fa0df8fc1cfc8ac4f8381bc54b8f33e1c38.zip
Replace CBitcoinSecret with {Encode,Decode}Secret
Diffstat (limited to 'src/bitcoin-tx.cpp')
-rw-r--r--src/bitcoin-tx.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index a9f7264f6..4770635c6 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);
}