From 471426fb3b2c2fa37640c03819c4f7be69ba8301 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Wed, 31 Aug 2011 12:27:19 -0400 Subject: Fixed potential deadlocks in GUI code. Also changed semantics of CWalletTx::GetTxTime(); now always returns the time the transaction was received by this node, not the average block time. And added information about -DDEBUG_LOCKORDER to coding.txt. --- src/wallet.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index 745fbefdb1..1daec98d34 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -353,22 +353,6 @@ int64 CWallet::GetDebit(const CTxIn &txin) const int64 CWalletTx::GetTxTime() const { - CRITICAL_BLOCK(cs_main) - { - if (!fTimeReceivedIsTxTime && hashBlock != 0) - { - // If we did not receive the transaction directly, we rely on the block's - // time to figure out when it happened. We use the median over a range - // of blocks to try to filter out inaccurate block times. - map::iterator mi = mapBlockIndex.find(hashBlock); - if (mi != mapBlockIndex.end()) - { - CBlockIndex* pindex = (*mi).second; - if (pindex) - return pindex->GetMedianTime(); - } - } - } return nTimeReceived; } -- cgit v1.2.3