Key origin metadata, with HD wallet support #8471

Open
wants to merge 3 commits into
from

Conversation

Projects
None yet
4 participants
Member

luke-jr commented Aug 6, 2016

This upgrades #5916/#8132 to support HD wallets by adding a map<string,string> at the end of CKeyMetadata which can be used to store future-proof data, similar to CWalletTx's mapValue.

Contributor

fanquake commented Aug 8, 2016

This needs a rebase.

@fanquake fanquake commented on an outdated diff Aug 8, 2016

src/wallet/walletdb.h
READWRITE(this->nVersion);
nVersion = this->nVersion;
READWRITE(nCreateTime);
if (this->nVersion >= VERSION_WITH_HDDATA)
{
+ // Core/Knots 0.13+
@fanquake

fanquake Aug 8, 2016

Contributor

Knots ?

jonasschnelli added the Wallet label Aug 8, 2016

Member

jonasschnelli commented Aug 8, 2016

Needs rebase.

Member

luke-jr commented Aug 9, 2016

Rebased, and logic re-factored to deal with the optional wallet version bump for HD. Not sure if this is the best approach...

jonasschnelli and others added some commits Jun 24, 2015

@jonasschnelli @luke-jr jonasschnelli wallet: Add key origin flags
An encrypted wallet can still hold keys which where created when the wallet was unencrypted.

This PR will add a 8bit-flags-int to the CKeyMetadata class.

`listreceivedbyaddress` will report whether the key was generated within a enctypted wallet or if it was imported throught `importprivkey`
d2a682e
@luke-jr luke-jr wallet: Key origin refactoring d275b94
@luke-jr luke-jr wallet: Reimplement key origin as a field in a new CKeyMetadata map ff44853
Contributor

TheBlueMatt commented Jul 11, 2017

Is this still relevant with the default-added hdKeypath metadata when we generate hd keys now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment