mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Move GenerateNewKey back to CWallet
This commit is contained in:
parent
0b807a417f
commit
9976cf070f
4 changed files with 12 additions and 12 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue