Make wallet network immutable after creation, or document and validate it explicitly
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start by reading the --network option on CliOpts and trace how it reaches wallet creation and other subcommands; then find the check that compares the stored and requested networks. Decide whether to ignore the option after creation or report a clear mismatch with the stored network and suggested fix. Done when the chosen behavior is documented and a different network produces the intended result.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the enhancement
The --network flag is a top-level option on every command, which makes it look like a per-invocation choice. In reality the network is fixed at wallet create and stored in the wallet config. Passing a different value later fails with Error: Generic error: Network mismatch: loaded testnet, expected testnet4, which does not explain why. Either the flag should be ignored on non-creation commands (network read from config), or the mismatch should be caught early with a clear message naming the wallet's stored network and suggesting the fix.
Use case
Descriptors only distinguish mainnet from non-mainnet (xpub vs tpub). Testnet, testnet4, signet, and regtest all share tpub, so the network genuinely cannot be inferred from the descriptor and has to be stored and validated separately so the current check is correct, only the UX is wrong. A user who created a wallet on one network and later types a different --network out of habit, or omits the flag entirely if it has a default, gets an opaque error that reads like a descriptor problem. A specific message for example: This wallet was created for network 'testnet'; remove --network or pass --network testnet turns a confusing failure into a one-line fix. Ignoring the flag on non-creation commands would be cleaner still, since the value is not actually a choice at that point.
Additional context
The flag is defined on CliOpts and flows into every subcommand, so nothing at the definition site signals that it is creation-time-only. At minimum, the --network help text should note that on non-creation commands it must match the wallet's stored network. The generic wrapping in Error::Generic is what hides the cause: the underlying check knows both the stored network and the requested one, but that information never reaches the user.
- Lingua principale
- Rust
- Stelle
- 142
- Fork
- 103
- Merge medio
- 2g 9h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bitcoindevkit/bdk-cli
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
bitcoindevkit/bdk-cli#360 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bitcoindevkit/bdk-cli#358 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bitcoindevkit/bdk-cli#357 ·
I maintainer di solito rispondono entro 2 giorni
-
Remove "wallet" field from `WalletConfigInner`Forse già presa @Jennycj l’ha presa 7 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bitcoindevkit/bdk-cli#332 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Add wallet commands that returns a list of unused addressesForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
bitcoindevkit/bdk-cli#349 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di bitcoindevkit/bdk-cli
Issue simili
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)Forse già presa @ericz7900 l’ha presa oggi. Apertallm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
[Package Request]: LificApertaHelp-Wanted Needs-Triage Package-Request
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
microsoft/winget-pkgs#456324 ·
I maintainer di solito rispondono entro 1 giorno
-
ai_p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ClickHouse/ClickHouse#126833 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area/runtime good first issue size/S type/refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
lorica-labs/volant#681 ·
I maintainer di solito rispondono entro 1 giorno