Remove redundant run time assertions (AssertLockHeld(foo)) for locks already checked at compile time (EXCLUSIVE_LOCKS_REQUIRED(foo), -Wthread-safety).
The redundancy can be verified by checking that the function that contains the removed run time assertion has the corresponding compile time check.
The relevant compile time checks can be listed using:
git grep -E -A3 '(ImplicitlyLearnRelatedKeyScripts|MaybeSetPeerAsAnnouncingHeaderAndIDs|TipMayBeStale|BlockRequestAllowed|SendRejectsAndCheckIfBanned|ConsiderEviction|IsRBFOptIn|entryToJSON|removeForReorg|GetSortedDepthAndScore|RemoveStaged|trackPackageRemoved|CheckFinalTx|TestLockPointValidity|IsCurrentForFeeEstimation|UpdateMempoolForReorg|CheckInputsFromMempoolAndCache|AcceptToMemoryPoolWorker|CheckForkWarningConditions|CheckForkWarningConditionsOnNewFork|CheckInputs|GetBlockScriptFlags|ConnectBlock|ActivateBestChainStep|InvalidateBlock|ResetBlockFailureFlags|AddToBlockIndex|AcceptBlockHeader|AcceptBlock|TestBlockValidity|InsertBlockIndex|GenerateNewKey|AddKeyPubKeyWithDB|LoadKeyMetadata|LoadScriptMetadata|UpdateTimeFirstKey|RemoveWatchOnly|HasWalletSpend|IncOrderPosNext|AvailableCoins|ListCoins|SignTransaction|ZapSelectTx|KeypoolCountExternalKeys|LoadKeyPool|GetAddressGroupings|MarkReserveKeysAsUsed|LockCoin|UnlockCoin|UnlockAllCoins|IsLockedCoin|ListLockedCoins)' | grep -B3 EXCLUSIVE_LOCKS_REQUIRED