mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Move GenerateNewKey back to CWallet
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user