diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index b9eb0d3ee..e8cc49b1f 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 8ed27c3cc..243bf9ac3 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 f5b90d3a9..987665c9d 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;
             }