diff options
author | jtimon <jtimon@monetize.io> | 2014-06-28 23:36:06 +0200 |
---|---|---|
committer | jtimon <jtimon@monetize.io> | 2014-07-07 10:20:28 +0200 |
commit | 209377a7cb5a9ea5d724faf94846ee5bacd289e7 (patch) | |
tree | 41a311498d0758dfb108bc5d03037e5b08bb654f /src/rpcdump.cpp | |
parent | 6654a87e7b2bd5d1d4a5c0af70d0468dfde300a9 (diff) |
Use GetBlockTime() more
Diffstat (limited to 'src/rpcdump.cpp')
-rw-r--r-- | src/rpcdump.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index 593e0d2b6b..d20bfcf095 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -157,7 +157,7 @@ Value importwallet(const Array& params, bool fHelp) if (!file.is_open()) throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file"); - int64_t nTimeBegin = chainActive.Tip()->nTime; + int64_t nTimeBegin = chainActive.Tip()->GetBlockTime(); bool fGood = true; @@ -215,7 +215,7 @@ Value importwallet(const Array& params, bool fHelp) pwalletMain->ShowProgress("", 100); // hide progress dialog in GUI CBlockIndex *pindex = chainActive.Tip(); - while (pindex && pindex->pprev && pindex->nTime > nTimeBegin - 7200) + while (pindex && pindex->pprev && pindex->GetBlockTime() > nTimeBegin - 7200) pindex = pindex->pprev; if (!pwalletMain->nTimeFirstKey || nTimeBegin < pwalletMain->nTimeFirstKey) @@ -301,7 +301,7 @@ Value dumpwallet(const Array& params, bool fHelp) file << strprintf("# Wallet dump created by Bitcoin %s (%s)\n", CLIENT_BUILD, CLIENT_DATE); file << strprintf("# * Created on %s\n", EncodeDumpTime(GetTime())); file << strprintf("# * Best block at time of backup was %i (%s),\n", chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString()); - file << strprintf("# mined on %s\n", EncodeDumpTime(chainActive.Tip()->nTime)); + file << strprintf("# mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime())); file << "\n"; for (std::vector<std::pair<int64_t, CKeyID> >::const_iterator it = vKeyBirth.begin(); it != vKeyBirth.end(); it++) { const CKeyID &keyid = it->second; |