aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/walletdb.h
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-01-10 16:45:30 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2017-03-24 10:28:37 +0100
commit02592f4c5e6d9416165deef96398ac7760f457d1 (patch)
treee253d748e905d589885c1816acb798bd123434d9 /src/wallet/walletdb.h
parenta230b0588788dbe1ac84622aea169c577b381241 (diff)
downloadbitcoin-02592f4c5e6d9416165deef96398ac7760f457d1.tar.xz
[Wallet] split the keypool in an internal and external part
Diffstat (limited to 'src/wallet/walletdb.h')
-rw-r--r--src/wallet/walletdb.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h
index 4d7dfb727e..016296f259 100644
--- a/src/wallet/walletdb.h
+++ b/src/wallet/walletdb.h
@@ -46,9 +46,12 @@ class CHDChain
{
public:
uint32_t nExternalChainCounter;
+ uint32_t nInternalChainCounter;
CKeyID masterKeyID; //!< master key hash160
- static const int CURRENT_VERSION = 1;
+ static const int VERSION_HD_BASE = 1;
+ static const int VERSION_HD_CHAIN_SPLIT = 2;
+ static const int CURRENT_VERSION = VERSION_HD_CHAIN_SPLIT;
int nVersion;
CHDChain() { SetNull(); }
@@ -58,6 +61,8 @@ public:
{
READWRITE(this->nVersion);
READWRITE(nExternalChainCounter);
+ if (this->nVersion >= VERSION_HD_CHAIN_SPLIT)
+ READWRITE(nInternalChainCounter);
READWRITE(masterKeyID);
}
@@ -65,6 +70,7 @@ public:
{
nVersion = CHDChain::CURRENT_VERSION;
nExternalChainCounter = 0;
+ nInternalChainCounter = 0;
masterKeyID.SetNull();
}
};