Skip to content

Commit

Permalink
Move functions in wallet.h to implementation file
Browse files Browse the repository at this point in the history
Breaks compile-time dependency of wallet.h on util.
  • Loading branch information
laanwj committed Aug 26, 2014
1 parent 651480c commit af8297c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
17 changes: 17 additions & 0 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
18 changes: 3 additions & 15 deletions src/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,8 @@ class CKeyPool
int64_t nTime;
CPubKey vchPubKey;

CKeyPool()
{
nTime = GetTime();
}

CKeyPool(const CPubKey& vchPubKeyIn)
{
nTime = GetTime();
vchPubKey = vchPubKeyIn;
}
CKeyPool();
CKeyPool(const CPubKey& vchPubKeyIn);

IMPLEMENT_SERIALIZE
(
Expand Down Expand Up @@ -840,11 +832,7 @@ class CWalletKey
//// todo: add something to note what created it (user, getnewaddress, change)
//// maybe should have a map<string, string> property map

CWalletKey(int64_t nExpires=0)
{
nTimeCreated = (nExpires ? GetTime() : 0);
nTimeExpires = nExpires;
}
CWalletKey(int64_t nExpires=0);

IMPLEMENT_SERIALIZE
(
Expand Down

0 comments on commit af8297c

Please sign in to comment.