No description provided.
[Wallet] Move key derivation logic from GenerateNewKey to DeriveNewChildKey #8375
pull pstratem wants to merge 1 commits into bitcoin:master from pstratem:2016-07-19-cwallet-derivenewkey changing 2 files +43 −37-
pstratem commented at 11:43 PM on July 19, 2016: contributor
-
in src/wallet/wallet.h:None in af5a90e9da outdated
682 | @@ -683,6 +683,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface 683 | * Generate a new key 684 | */ 685 | CPubKey GenerateNewKey(); 686 | + CKey DeriveNewKey(CKeyMetadata &metadata);
instagibbs commented at 1:19 AM on July 20, 2016:nit: name is awfully close to GenerateNewKey to me. Perhaps something like "DeriveNewHDKey" or "DeriveNewChildKey".
pstratem commented at 1:50 AM on July 20, 2016:Done
pstratem force-pushed on Jul 20, 2016pstratem force-pushed on Jul 20, 2016pstratem force-pushed on Jul 20, 2016pstratem force-pushed on Jul 20, 2016pstratem force-pushed on Jul 20, 2016pstratem force-pushed on Jul 20, 2016pstratem force-pushed on Jul 20, 2016pstratem renamed this:Move key derivation logic from GenerateNewKey to DeriveNewKey
[Wallet] Move key derivation logic from GenerateNewKey to DeriveNewKey
on Jul 20, 2016pstratem renamed this:[Wallet] Move key derivation logic from GenerateNewKey to DeriveNewKey
[Wallet] Move key derivation logic from GenerateNewKey to DeriveNewChildKey
on Jul 20, 2016MarcoFalke added the label Refactoring on Jul 20, 2016MarcoFalke commented at 8:25 AM on July 20, 2016: memberConcept ACK 78e3df6
MarcoFalke added the label Wallet on Jul 20, 2016MarcoFalke added this to the milestone 0.14 on Jul 20, 2016in src/wallet/wallet.cpp:None in e4469e2382 outdated
129 | + CExtKey externalChainChildKey; //key at m/0'/0' 130 | + CExtKey childKey; //key at m/0'/0'/<n>' 131 | + 132 | + // try to get the master key 133 | + if (!GetKey(hdChain.masterKeyID, key)) 134 | + throw std::runtime_error("CWallet::GenerateNewKey(): Master key not found");
jonasschnelli commented at 8:41 AM on July 20, 2016:s/CWallet::GenerateNewKey()/CWallet::DeriveNewChildKey:-)
pstratem commented at 9:31 PM on July 20, 2016:Indeed
sipa commented at 5:02 PM on August 24, 2016:Please fix? :)
MarcoFalke commented at 5:37 PM on August 24, 2016:No need to fix this. A rebase will solve it, IIRC. (This should read
__func__in master already)jonasschnelli commented at 8:45 AM on July 20, 2016: contributorConcept ACK. After having done multiple implementation of a subclasses of
CKeyStore(CHDKeyStore), I think this "new" function should slowly be moved towardCKeyStore(or a subclass of it). The whole HD stuff could be kept there to not overpoluteCWallet(because in general hierarchical key derivation can be wallet neutral).Move key derivation logic from GenerateNewKey to DeriveNewChildKey 78e3df6fa0pstratem force-pushed on Jul 20, 2016jonasschnelli commented at 8:32 AM on August 24, 2016: contributorNeeds rebase.
sipa commented at 5:19 PM on August 26, 2016: memberCode review ACK, but needs rebase.
laanwj closed this on Sep 30, 2016MarcoFalke locked this on Sep 8, 2021ContributorsLabelsMilestone
0.14.0
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 09:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 09:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me