Repository navigation
link-dotfiles: wait 3 min before no-peer prompt - #304
Merged
Merged
Conversation
The "Bitcoin Core has no peers" prompt fired after a single check 30 seconds after Core finished starting. Over Tor the first peer often takes longer than that, so users were told to open Tor Connection while everything was working normally. Poll getnetworkinfo every 15 seconds instead and only show the prompt if Core has had no peers for the full 3 minutes. Stop watching as soon as a peer connects or Core stops answering RPC.
This comment has been minimized.
This comment has been minimized.
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.
Requested by Ben · project thread
Before: "Bitcoin Core has no peers" popped up after one check 30 seconds after Core finished starting. Over Tor the first peer often takes longer, so users were told to open Tor Connection while everything was fine.
After: the prompt only appears if Core has had zero peers for 3 full minutes after startup. If any peer connects (or Core stops answering RPC) during that time, nothing is shown.
How: the
--core-startupbackground check inbails/.local/bin/link-dotfilesnow pollsbitcoin-cli getnetworkinfoevery 15 seconds for up to 180 seconds and exits early on the first nonzero connection count. Dialog text and the Open Tor Connection action are unchanged.Tested with
bash -n, shellcheck, and a stubbedbitcoin-cli/zenityrun: with no peers the dialog appears after the full window (6 polls); with a peer on the 3rd poll it exits without a dialog. Not tested on real Tails.No overlap with #293 or #301 (neither touches
link-dotfiles).🤖 Generated with Claude Code
https://claude.ai/code/session_012s4QWDRFD7xomyKNn1Zd8N
Generated by Claude Code