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