Repository navigation
wallet: Let callers name the chain and wallet - #215
Draft
BenWestgate wants to merge 1 commit into
Draft
BenWestgate wants to merge 1 commit into
BenWestgate wants to merge 1 commit into
Conversation
BitcoinCore.connect and initialize choose a network and a wallet by prompting in text. A frontend that already asked the operator had to answer those prompts by parsing them. Take the choice directly: connect(chain=...) uses that network or says it is gone, and raises ChainChoice listing the networks when several answer and nothing can prompt. initialize(wallet=...) uses that wallet without prompting and refuses one that is no longer empty. Claude-Session: https://claude.ai/code/session_018HrKoywz6PT9c91jvKou7Q
This branch has not been deployed
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.
Before:
BitcoinCore.connectandinitializepicked a network and a wallet only by prompting in text. The GUI already asks the operator on screen, sowallet_setup.pyanswered those prompts by parsing them (_Answer,Offer, about 50 lines).After: a caller can pass the choice.
connect(chain=...)uses that network, or says it is no longer running. When several networks answer and nothing can prompt, it raisesChainChoicewith.chains, keeping the old message.initialize(wallet=...)uses that wallet without prompting, and refuses one that is no longer empty. The CLI is unchanged.How: +21/−3 in
_bitcoin_core.py, plus two tests. The GUI can drop its prompt parsing once gui-reviewability-v1 picks up reviewability-v1. This is part of holding the GUI at 2,000 lines.Validation: 914 tests pass normally and 914 under
python -O. Ruff and mypy pass.Generated by Claude Code