diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-07-27 16:38:16 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-07-27 16:32:30 -0400 |
commit | fa6f22bf44c0f741285f27f27ac18e9679802e5e (patch) | |
tree | d066e4d3aa8e19d9b720685da697dc4cd3f9cbec /src/wallet | |
parent | fa6dc7fa5fdfd76c6dd5f7ae693a2fb4e37e271f (diff) | |
download | bitcoin-fa6f22bf44c0f741285f27f27ac18e9679802e5e.tar.xz |
wallet: Rename CWalletKey to OldKey
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 6 | ||||
-rw-r--r-- | src/wallet/wallet.h | 19 | ||||
-rw-r--r-- | src/wallet/walletdb.cpp | 2 |
3 files changed, 8 insertions, 19 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index b9eb0d3eed..e8cc49b1fc 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4626,12 +4626,6 @@ CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn) m_pre_split = false; } -CWalletKey::CWalletKey(int64_t nExpires) -{ - nTimeCreated = (nExpires ? GetTime() : 0); - nTimeExpires = nExpires; -} - void CMerkleTx::SetMerkleBranch(const uint256& block_hash, int posInBlock) { // Update the tx's hashBlock diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 8ed27c3cc8..243bf9ac32 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -676,23 +676,18 @@ public: } }; -/** Private key that includes an expiration date in case it never gets used. */ -class CWalletKey -{ -public: +/** Private key that was serialized by an old wallet (only used for deserialization) */ +struct OldKey { CPrivKey vchPrivKey; - int64_t nTimeCreated; - int64_t nTimeExpires; - std::string strComment; - // todo: add something to note what created it (user, getnewaddress, change) - // maybe should have a map<string, string> property map - - explicit CWalletKey(int64_t nExpires=0); - ADD_SERIALIZE_METHODS; template <typename Stream, typename Operation> inline void SerializationOp(Stream& s, Operation ser_action) { + // no longer used by the wallet, thus dropped after deserialization: + int64_t nTimeCreated; + int64_t nTimeExpires; + std::string strComment; + int nVersion = s.GetVersion(); if (!(s.GetType() & SER_GETHASH)) READWRITE(nVersion); diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index f5b90d3a9c..987665c9da 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -271,7 +271,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, wss.nKeys++; ssValue >> pkey; } else { - CWalletKey wkey; + OldKey wkey; ssValue >> wkey; pkey = wkey.vchPrivKey; } |