HomePhabricator

Use LockAssertion utility class instead of AssertLockHeld()

Description

Use LockAssertion utility class instead of AssertLockHeld()

Summary:
This change prepares for upcoming commit "Do not hide compile-time
thread safety warnings" by replacing AssertLockHeld() with
LockAssertion() where needed.

This is a backport of core#19668 [1/5]
https://github.com/bitcoin/bitcoin/pull/19668/commits/af9ea55a72c94678b343f5dd98dc78f3a3ac58cb

Backport notse:

  • We do not have a lock in RelayTransaction because we did not backport core#18044 (commit ac88e2eb619821ad7ae1d45d4b40be69051d3999)
  • This change is partially reverted in D10172 after D10171 makes it possible to annotate the lambda functions with EXCLUSIVE_LOCKS_REQUIRED

Test Plan:
With TSAN:
ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10161

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Aug 5 2020, 10:10
PiRKCommitted on Sep 22 2021, 08:05
PiRKPushed on Sep 22 2021, 08:05
Reviewer
Restricted Project
Differential Revision
D10161: Use LockAssertion utility class instead of AssertLockHeld()
Parents
rABC64f1961e185b: Remove -zapwallettxes
Branches
Unknown
Tags
Unknown