Skip to content

Commit 74f7c94

Browse files
committed
Merge preserve_unsupported_keyflags
2 parents 9e0533b + 5321a6a commit 74f7c94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wallet/walletdb.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ class CKeyMetadata
136136
{
137137
public:
138138
static const int VERSION_BASIC=1;
139+
static const int VERSION_WITH_FLAGS = 2; // not supported, but preserved
139140
static const int VERSION_WITH_HDDATA=10;
140141
static const int VERSION_WITH_KEY_ORIGIN = 12;
141142
static const int CURRENT_VERSION=VERSION_WITH_KEY_ORIGIN;
142143
int nVersion;
143144
int64_t nCreateTime; // 0 means unknown
144145
std::string hdKeypath; //optional HD/bip32 keypath. Still used to determine whether a key is a seed. Also kept for backwards compatibility
145146
CKeyID hd_seed_id; //id of the HD seed used to derive this key
147+
uint8_t unsupported_key_flags;
146148
KeyOriginInfo key_origin; // Key origin info with path and fingerprint
147149
bool has_key_origin = false; //!< Whether the key_origin is useful
148150

@@ -161,6 +163,8 @@ class CKeyMetadata
161163
READWRITE(obj.nVersion, obj.nCreateTime);
162164
if (obj.nVersion >= VERSION_WITH_HDDATA) {
163165
READWRITE(obj.hdKeypath, obj.hd_seed_id);
166+
} else if (obj.nVersion >= VERSION_WITH_FLAGS) {
167+
READWRITE(obj.unsupported_key_flags);
164168
}
165169
if (obj.nVersion >= VERSION_WITH_KEY_ORIGIN)
166170
{

0 commit comments

Comments
 (0)