Skip to content

Commit 68d7682

Browse files
committed
[Wallet] ensure CKeyMetadata.hdMasterKeyID will be cleared during SetNull()
1 parent f708085 commit 68d7682

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/walletdb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ class CKeyMetadata
8787
}
8888
CKeyMetadata(int64_t nCreateTime_)
8989
{
90-
nVersion = CKeyMetadata::CURRENT_VERSION;
90+
SetNull();
9191
nCreateTime = nCreateTime_;
92-
hdKeypath.clear();
9392
}
9493

9594
ADD_SERIALIZE_METHODS;
@@ -111,6 +110,7 @@ class CKeyMetadata
111110
nVersion = CKeyMetadata::CURRENT_VERSION;
112111
nCreateTime = 0;
113112
hdKeypath.clear();
113+
hdMasterKeyID.SetNull();
114114
}
115115
};
116116

0 commit comments

Comments
 (0)