From af8297c010154243cb11b27184a9badb4e03ecb0 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 21 Aug 2014 05:04:43 +0200 Subject: [PATCH] Move functions in wallet.h to implementation file Breaks compile-time dependency of wallet.h on util. --- src/wallet.cpp | 17 +++++++++++++++++ src/wallet.h | 18 +++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/wallet.cpp b/src/wallet.cpp index 7c04743c0f..ee4793b3f1 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -2168,3 +2168,20 @@ bool CWallet::GetDestData(const CTxDestination &dest, const std::string &key, st } return false; } + +CKeyPool::CKeyPool() +{ + nTime = GetTime(); +} + +CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn) +{ + nTime = GetTime(); + vchPubKey = vchPubKeyIn; +} + +CWalletKey::CWalletKey(int64_t nExpires) +{ + nTimeCreated = (nExpires ? GetTime() : 0); + nTimeExpires = nExpires; +} diff --git a/src/wallet.h b/src/wallet.h index 34c699e979..7cbbb2a6ed 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -61,16 +61,8 @@ public: int64_t nTime; CPubKey vchPubKey; - CKeyPool() - { - nTime = GetTime(); - } - - CKeyPool(const CPubKey& vchPubKeyIn) - { - nTime = GetTime(); - vchPubKey = vchPubKeyIn; - } + CKeyPool(); + CKeyPool(const CPubKey& vchPubKeyIn); IMPLEMENT_SERIALIZE ( @@ -840,11 +832,7 @@ public: //// todo: add something to note what created it (user, getnewaddress, change) //// maybe should have a map property map - CWalletKey(int64_t nExpires=0) - { - nTimeCreated = (nExpires ? GetTime() : 0); - nTimeExpires = nExpires; - } + CWalletKey(int64_t nExpires=0); IMPLEMENT_SERIALIZE (