Make wallet network immutable after creation, or document and validate it explicitly
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 143
- Forks
- 103
- Merge medio
- 2 d 9 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bitcoindevkit/bdk-cli
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
bitcoindevkit/bdk-cli#362 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
bitcoindevkit/bdk-cli#360 ·
Los mantenedores suelen responder en 1 día
-
Expose remaining SignOptions fields in the wallet sign commandPosiblemente ocupada @emma31-dev la tomó hace 1 día. Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bitcoindevkit/bdk-cli#358 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
wallet sign command returns generic error for decoding failuresPosiblemente ocupada @emma31-dev la tomó hace 1 día. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bitcoindevkit/bdk-cli#357 ·
Los mantenedores suelen responder en 1 día
-
Remove "wallet" field from `WalletConfigInner`Posiblemente ocupada @Jennycj la tomó hace 10 días. Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bitcoindevkit/bdk-cli#332 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de bitcoindevkit/bdk-cli
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
test(breg): postgres_startup needs the tooling feature its required-features does not declareAbiertoarea:breg bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
registrystack/registry-stack#2307 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
farion1231/cc-switch#8696 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
C-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
rust-lang/rust-analyzer#23547 ·
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenZeppelin/guardian#570 ·
Los mantenedores suelen responder en 1 día