Skip to content

fix: improve bitcoind startup wait logic#109

Merged
zoedberg merged 1 commit into
RGB-Tools:masterfrom
Arshia-r-m:electrs-race-condition
Mar 13, 2026
Merged

fix: improve bitcoind startup wait logic#109
zoedberg merged 1 commit into
RGB-Tools:masterfrom
Arshia-r-m:electrs-race-condition

Conversation

@Arshia-r-m
Copy link
Copy Markdown
Contributor

This PR aims to handle the race condition between electrs and bitcoind where electrs starts before the rpc is fully ready

Copilot AI review requested due to automatic review settings March 10, 2026 16:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the regtest startup script to avoid a race where electrs can start before bitcoind’s RPC interface is ready, causing early failures during local regtest bring-up.

Changes:

  • Switch _wait_for_bitcoind from log-grepping to an RPC readiness check via bitcoin-cli getblockchaininfo.
  • Start bitcoind first, initialize the mining wallet/blocks, then start electrs and proxy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread regtest.sh Outdated
Comment thread regtest.sh Outdated
Copy link
Copy Markdown
Member

@zoedberg zoedberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. please see the requested changes and comments

Comment thread regtest.sh Outdated
Co-authored-by: Zoe Faltibà <7492268+zoedberg@users.noreply.github.com>
@Arshia-r-m Arshia-r-m force-pushed the electrs-race-condition branch from e4eaa7e to 1d8c9ba Compare March 13, 2026 11:02
Copy link
Copy Markdown
Member

@zoedberg zoedberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@zoedberg zoedberg merged commit 648bd3b into RGB-Tools:master Mar 13, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants