aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@pm.me>2021-12-03 10:34:07 -0500
committerJames O'Beirne <james.obeirne@pm.me>2021-12-03 10:34:07 -0500
commit7da4a8ffb3c9807c59f8ba63781169e4045594ba (patch)
tree6a16d8577abbee2bdcc7016db0903ca41d8a82d2 /src/validation.h
parent57982f419e36d0023c83af2dd0d683ca3160dc2a (diff)
downloadbitcoin-7da4a8ffb3c9807c59f8ba63781169e4045594ba.tar.xz
cover DisconnectBlock with lock annotation
CoinsTip() access requires cs_main and therefore so should this function.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h
index 9385dfdab4..2609538ece 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -718,7 +718,8 @@ public:
bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, BlockValidationState& state, CBlockIndex** ppindex, bool fRequested, const FlatFilePos* dbp, bool* fNewBlock) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
// Block (dis)connection on a given view:
- DisconnectResult DisconnectBlock(const CBlock& block, const CBlockIndex* pindex, CCoinsViewCache& view);
+ DisconnectResult DisconnectBlock(const CBlock& block, const CBlockIndex* pindex, CCoinsViewCache& view)
+ EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
bool ConnectBlock(const CBlock& block, BlockValidationState& state, CBlockIndex* pindex,
CCoinsViewCache& view, bool fJustCheck = false) EXCLUSIVE_LOCKS_REQUIRED(cs_main);