1
// Copyright (c) 2009-2011 Satoshi Nakamoto & Bitcoin developers
2
// Distributed under the MIT/X11 software license, see the accompanying
3
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
10
//////////////////////////////////////////////////////////////////////////////
15
std::vector<unsigned char> CKeyStore::GenerateNewKey()
21
throw std::runtime_error("GenerateNewKey() : AddKey failed");
22
return key.GetPubKey();
25
bool CKeyStore::AddKey(const CKey& key)
27
CRITICAL_BLOCK(cs_mapKeys)
29
mapKeys[key.GetPubKey()] = key.GetPrivKey();
30
mapPubKeys[Hash160(key.GetPubKey())] = key.GetPubKey();