diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2011-07-03 15:33:01 +0200 |
---|---|---|
committer | Matt Corallo <matt@bluematt.me> | 2011-07-13 02:11:25 +0200 |
commit | 0efda1a79eab6dd2e101edc615c6dd14138c31a2 (patch) | |
tree | 948076f3e360c60969f298edc0e08bd74146b616 /src/script.cpp | |
parent | b6b039d84ed3d1616cb97ee45ff24ec343efbed0 (diff) |
Do not use obsolete CPrivKey for passing keys around
Diffstat (limited to 'src/script.cpp')
-rw-r--r-- | src/script.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script.cpp b/src/script.cpp index 13a53d6b9c..aa7f1f5116 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1038,13 +1038,13 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash { // Sign const valtype& vchPubKey = item.second; - CPrivKey privkey; - if (!keystore.GetPrivKey(vchPubKey, privkey)) + CKey key; + if (!keystore.GetPrivKey(vchPubKey, key)) return false; if (hash != 0) { vector<unsigned char> vchSig; - if (!CKey::Sign(privkey, hash, vchSig)) + if (!key.Sign(hash, vchSig)) return false; vchSig.push_back((unsigned char)nHashType); scriptSigRet << vchSig; @@ -1057,13 +1057,13 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash if (mi == mapPubKeys.end()) return false; const vector<unsigned char>& vchPubKey = (*mi).second; - CPrivKey privkey; - if (!keystore.GetPrivKey(vchPubKey, privkey)) + CKey key; + if (!keystore.GetPrivKey(vchPubKey, key)) return false; if (hash != 0) { vector<unsigned char> vchSig; - if (!CKey::Sign(privkey, hash, vchSig)) + if (!key.Sign(hash, vchSig)) return false; vchSig.push_back((unsigned char)nHashType); scriptSigRet << vchSig << vchPubKey; |