Make wallet network immutable after creation, or document and validate it explicitly
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 142
- Forks
- 103
- Ø Merge
- 2 T. 9 Std.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus bitcoindevkit/bdk-cli
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
bitcoindevkit/bdk-cli#360 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
bitcoindevkit/bdk-cli#358 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bitcoindevkit/bdk-cli#357 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Remove "wallet" field from `WalletConfigInner`Evtl. vergeben @Jennycj hat das vor 8 Tagen übernommen. Offenenhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bitcoindevkit/bdk-cli#332 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Add wallet commands that returns a list of unused addressesEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenenhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
bitcoindevkit/bdk-cli#349 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in bitcoindevkit/bdk-cli
Ähnliche Issues
-
engine-rs P3 review-deferral wasm
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
maniator/verticopolis#1154 ·
Maintainer antworten meist innerhalb von 1 Tag
-
FFMPEG_BIN/FFPROBE_BIN are always overridden, so a working system ffmpeg cannot be usedEvtl. vergeben @Bilker1422 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Stremio/stremio-service#116 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
sims1253/ry#720 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag