X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fwallet.cpp;h=da64aa5103960c8f3fff971ee5282bbb662a73db;hb=9976cf070fdda61afa30cd65ef5bcddad4f43e81;hp=42c49aa89176846fabb57cc13ac98ea6afd12f09;hpb=0b807a417f4a15f3e37ae35e70a72e6169f01c02;p=novacoin.git diff --git a/src/wallet.cpp b/src/wallet.cpp index 42c49aa..da64aa5 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -15,6 +15,16 @@ using namespace std; // mapWallet // +std::vector 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))