From 25bc9615b7480e4ba2c482a6f0e7e3b33f50e6e0 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 11 May 2018 16:56:19 -0400 Subject: Document validationinterace callback blocking deadlock potential. --- src/validation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/validation.cpp') diff --git a/src/validation.cpp b/src/validation.cpp index 9791d6e2d8..1a81cd17bb 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2704,6 +2704,9 @@ bool CChainState::ActivateBestChain(CValidationState &state, const CChainParams& // Block until the validation queue drains. This should largely // never happen in normal operation, however may happen during // reindex, causing memory blowup if we run too far ahead. + // Note that if a validationinterface callback ends up calling + // ActivateBestChain this may lead to a deadlock! We should + // probably have a DEBUG_LOCKORDER test for this in the future. SyncWithValidationInterfaceQueue(); } -- cgit v1.2.3