mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 04:02:25 +01:00
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.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
|
||||
{
|
||||
AssertLockHeld(cs_main);
|
||||
if (!IsFinalTx(wtx, chainActive.Height() + 1))
|
||||
{
|
||||
if (wtx.nLockTime < LOCKTIME_THRESHOLD)
|
||||
|
||||
Reference in New Issue
Block a user