Move GenerateNewKey back to CWallet

This commit is contained in:
Pieter Wuille
2012-02-18 15:02:36 +01:00
parent 0b807a417f
commit 9976cf070f
4 changed files with 12 additions and 12 deletions

View File

@@ -15,6 +15,16 @@ using namespace std;
// mapWallet
//
std::vector<unsigned char> CWallet::GenerateNewKey()
{
RandAddSeedPerfmon();
CKey key;
key.MakeNewKey();
if (!AddKey(key))
throw std::runtime_error("CWallet::GenerateNewKey() : AddKey failed");
return key.GetPubKey();
}
bool CWallet::AddKey(const CKey& key)
{
if (!CCryptoKeyStore::AddKey(key))