HomePhabricator

txorphanage: Add lock annotations

Description

txorphanage: Add lock annotations

Summary:
EraseOrphansFor was called both with and without g_cs_orphans held,
correct that so that it's always called with it already held.

LimitOrphanTxSize was always called with g_cs_orphans held, so
add annotations and don't lock it a second time.

This is a backport of core#21148 [3/14]
https://github.com/bitcoin/bitcoin/pull/21148/commits/38a11c355acfc15134c682571b3d92f66b0e7c3c

Depends on D11482

Test Plan:
With clang and debug:

ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Jan 31 2021, 15:35
PiRKCommitted on May 19 2022, 16:06
PiRKPushed on May 19 2022, 16:07
Reviewer
Restricted Project
Differential Revision
D11483: txorphanage: Add lock annotations
Parents
rABCc387f12e991c: txorphanage: Pass txid by reference instead of value
Branches
Unknown
Tags
Unknown