diff options
| author | Pieter Wuille <[email protected]> | 2011-07-03 15:33:01 +0200 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2011-07-13 02:11:25 +0200 |
| commit | 0efda1a79eab6dd2e101edc615c6dd14138c31a2 (patch) | |
| tree | 948076f3e360c60969f298edc0e08bd74146b616 /src/keystore.cpp | |
| parent | Add Wallet Encryption section to README (diff) | |
| download | discoin-0efda1a79eab6dd2e101edc615c6dd14138c31a2.tar.xz discoin-0efda1a79eab6dd2e101edc615c6dd14138c31a2.zip | |
Do not use obsolete CPrivKey for passing keys around
Diffstat (limited to 'src/keystore.cpp')
| -rw-r--r-- | src/keystore.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp index f659495a1..de13958a8 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -100,7 +100,7 @@ bool CCryptoKeyStore::AddCryptedKey(const std::vector<unsigned char> &vchPubKey, return true; } -bool CCryptoKeyStore::GetPrivKey(const std::vector<unsigned char> &vchPubKey, CPrivKey& keyOut) const +bool CCryptoKeyStore::GetPrivKey(const std::vector<unsigned char> &vchPubKey, CKey& keyOut) const { CRITICAL_BLOCK(cs_vMasterKey) { @@ -114,9 +114,7 @@ bool CCryptoKeyStore::GetPrivKey(const std::vector<unsigned char> &vchPubKey, CP CSecret vchSecret; if (!DecryptSecret(vMasterKey, (*mi).second, Hash((*mi).first.begin(), (*mi).first.end()), vchSecret)) return false; - CKey key; - key.SetSecret(vchSecret); - keyOut = key.GetPrivKey(); + keyOut.SetSecret(vchSecret); return true; } } |