From 9976cf070fdda61afa30cd65ef5bcddad4f43e81 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 18 Feb 2012 15:02:36 +0100 Subject: Move GenerateNewKey back to CWallet --- src/wallet.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index 42c49aa89..da64aa510 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)) -- cgit v1.2.3