aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorChris Moore <dooglus@gmail.com>2017-09-12 14:01:12 -0700
committerAndrew Chow <achow101-github@achow101.com>2018-05-12 13:15:21 -0400
commitb5ba01a18707b1d50c4d073bd40e1e92d78d04c1 (patch)
treea5d778bd459b76b06aaf94532590878402ccd894 /src/wallet/wallet.cpp
parentdd3c07acce7ab67f32a79393abf6227009bd440d (diff)
Add 'sethdseed' RPC to initialize or replace HD seed
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 9533e6ff56..3ca31ac9eb 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1452,7 +1452,11 @@ CPubKey CWallet::GenerateNewHDMasterKey()
{
CKey key;
key.MakeNewKey(true);
+ return DeriveNewMasterHDKey(key);
+}
+CPubKey CWallet::DeriveNewMasterHDKey(const CKey& key)
+{
int64_t nCreationTime = GetTime();
CKeyMetadata metadata(nCreationTime);