Description
handle_reorg holds the write lock on monitored_txs while calling get_transaction, determine_tx_status, and attempt_rebroadcast per affected tx — multiple RPC round-trips under the lock. Same anti-pattern as PR #3234.
Expected behaviour
Collect affected txids with a read lock, perform RPCs outside any lock, then apply updates under a single write lock.
Description
handle_reorgholds the write lock onmonitored_txswhile callingget_transaction,determine_tx_status, andattempt_rebroadcastper affected tx — multiple RPC round-trips under the lock. Same anti-pattern as PR #3234.Expected behaviour
Collect affected txids with a read lock, perform RPCs outside any lock, then apply updates under a single write lock.