aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-08-31 12:27:19 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-08-31 12:55:16 -0400
commit471426fb3b2c2fa37640c03819c4f7be69ba8301 (patch)
treecc9de8e932d07cf2549a625e6c614a2677ec1b0e /src/wallet.cpp
parent6cc4a62c0e696dcb9d90ba0504f688e4f644a10f (diff)
downloadbitcoin-471426fb3b2c2fa37640c03819c4f7be69ba8301.tar.xz
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.
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp16
1 files changed, 0 insertions, 16 deletions
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<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
- if (mi != mapBlockIndex.end())
- {
- CBlockIndex* pindex = (*mi).second;
- if (pindex)
- return pindex->GetMedianTime();
- }
- }
- }
return nTimeReceived;
}