fix(bitcoin-da): avoid monitored_txs write lock across RPC in monitor_transaction#3253
Open
amathxbt wants to merge 2 commits into
Open
Conversation
… monitor_transaction The write lock on `monitored_txs` was acquired before a `get_block_count()` RPC call, blocking all readers/writers for the duration of a network round-trip. Move the RPC call before lock acquisition.
jfldde
reviewed
May 5, 2026
jfldde
previously approved these changes
May 5, 2026
Author
|
Done @jfldde @eyusufatik removed the low-value comment at line 485 as requested. Commit: 760dffb |
jfldde
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3252
Problem
monitor_transactionholds themonitored_txswrite lock while callingget_block_count(), blocking all concurrent readers/writers for a full network round-trip — same pattern as #3234.Fix
Move
self.client.get_block_count().await?to before the write lock is acquired.