aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiondesc.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-04-15 12:43:17 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-04-17 16:46:01 +0200
commite07c943ce8df6c6cb3ece3fc676911ddb43ca184 (patch)
treec195a933389b7dc8f9eaf99730488dd35ee66206 /src/qt/transactiondesc.cpp
parent2f3308f2d2d46dd1f8f4a38a14e2cf1216b06afe (diff)
Add AssertLockHeld for cs_main to ChainActive-using functions
All functions that use ChainActive but do not aquire the cs_main lock themselves, need to be called with the cs_main lock held. This commit adds assertions to all externally callable functions that use chainActive or chainMostWork. This will flag usages when built with -DDEBUG_LOCKORDER.
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r--src/qt/transactiondesc.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 4aebaa1e7f..6391f9bc19 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -20,6 +20,7 @@
QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
{
+ AssertLockHeld(cs_main);
if (!IsFinalTx(wtx, chainActive.Height() + 1))
{
if (wtx.nLockTime < LOCKTIME_THRESHOLD)