diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2022-01-19 14:03:37 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2022-01-25 20:43:28 +0100 |
commit | e9f3aa5f6a7b39e8d5f2069617e5e382798d8d60 (patch) | |
tree | dab6f60d74047fd32d90bbe0fc4c0f9f81d1d920 /src/chain.h | |
parent | 8ef457cb83fac796f8b6a56977b1016193fc1185 (diff) |
Require CBlockIndex::RaiseValidity() to hold cs_main
Diffstat (limited to 'src/chain.h')
-rw-r--r-- | src/chain.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chain.h b/src/chain.h index 2eb780d499..c2a9cba1e6 100644 --- a/src/chain.h +++ b/src/chain.h @@ -328,8 +328,9 @@ public: //! Raise the validity level of this block index entry. //! Returns true if the validity was changed. - bool RaiseValidity(enum BlockStatus nUpTo) + bool RaiseValidity(enum BlockStatus nUpTo) EXCLUSIVE_LOCKS_REQUIRED(::cs_main) { + AssertLockHeld(::cs_main); assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed. if (nStatus & BLOCK_FAILED_MASK) return false; |