diff options
| author | Jonas Schnelli <[email protected]> | 2016-07-09 11:41:01 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2016-07-09 11:52:17 +0200 |
| commit | 5b95dd2c256dd7ba3808021adc31bb85b41553c8 (patch) | |
| tree | abde39c27d37dcf802c92633faa8c4b1c9dbaf83 /src/wallet/wallet.cpp | |
| parent | Merge #8314: Fix pkg-config issues for 0.13 (diff) | |
| download | discoin-5b95dd2c256dd7ba3808021adc31bb85b41553c8.tar.xz discoin-5b95dd2c256dd7ba3808021adc31bb85b41553c8.zip | |
[Wallet] extend CKeyMetadata with HD keypath
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a0095ebd9..33e516a7f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -126,6 +126,8 @@ CPubKey CWallet::GenerateNewKey() // childIndex | BIP32_HARDENED_KEY_LIMIT = derive childIndex in hardened child-index-range // example: 1 | BIP32_HARDENED_KEY_LIMIT == 0x80000001 == 2147483649 externalChainChildKey.Derive(childKey, hdChain.nExternalChainCounter | BIP32_HARDENED_KEY_LIMIT); + metadata.hdKeypath = "m/0'/0'/"+std::to_string(hdChain.nExternalChainCounter)+"'"; + metadata.hdMasterKeyID = hdChain.masterKeyID; // increment childkey index hdChain.nExternalChainCounter++; } while(HaveKey(childKey.key.GetPubKey().GetID())); |