diff options
| author | Pieter Wuille <[email protected]> | 2012-02-18 15:02:36 +0100 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2012-02-18 15:42:38 +0100 |
| commit | 9976cf070fdda61afa30cd65ef5bcddad4f43e81 (patch) | |
| tree | 79b6434a7ab3303a6c4fb3c03769272c0ff3a47a /src/wallet.cpp | |
| parent | Add SetMinVersion to CWallet (diff) | |
| download | discoin-9976cf070fdda61afa30cd65ef5bcddad4f43e81.tar.xz discoin-9976cf070fdda61afa30cd65ef5bcddad4f43e81.zip | |
Move GenerateNewKey back to CWallet
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<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)) |