Make wallet network immutable after creation, or document and validate it explicitly
維護者通常 4 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Rust
- 星號
- 143
- 分支
- 110
- 平均合併
- 9 天 6 小時
- 30 天內合併 PR
- 7
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
bitcoindevkit/bdk-cli 的其他 Issue
-
`key restore` ignores `--password`, so restoring a passphrase-protected mnemonic gives the wrong key可能已有人在做 @chukwudiikeh 今天認領。 未關閉bug
難度 1/5 1-3 小時 新手友好度 92/100
bitcoindevkit/bdk-cli#372 · 1 則留言 ·
維護者通常 4 天內回覆
-
key generate subcommand silently coerces any word count other than 12 to 24 words可能已有人在做 @Olorunshogo 於 1 天前認領。 未關閉enhancement good first issue
難度 2/5 1-3 小時 新手友好度 84/100
bitcoindevkit/bdk-cli#362 · 5 則留言 · 已指派 1 人 ·
維護者通常 4 天內回覆
-
create_tx accepts recipient addresses from the wrong network可能已有人在做 @emma31-dev 於 6 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 82/100
bitcoindevkit/bdk-cli#360 ·
維護者通常 4 天內回覆
-
Expose remaining SignOptions fields in the wallet sign command可能已有人在做 @emma31-dev 於 15 天前認領。 未關閉enhancement
難度 2/5 1-3 小時 新手友好度 78/100
bitcoindevkit/bdk-cli#358 · 1 則留言 ·
維護者通常 4 天內回覆
-
wallet sign command returns generic error for decoding failures可能已有人在做 @emma31-dev 於 3 天前認領。 未關閉chore good first issue
難度 2/5 1-3 小時 新手友好度 72/100
bitcoindevkit/bdk-cli#357 · 已指派 1 人 ·
維護者通常 4 天內回覆
查看 bitcoindevkit/bdk-cli 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 73/100
維護者通常 1 天內回覆
-
🐞 bug 🧩 bevy_gantz_egui
難度 2/5 1-3 小時 新手友好度 82/100
nannou-org/gantz#500 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 68/100
metasequoiaime/msime#10989 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
fritzprix/libr-agent#2612 ·
維護者通常 1 天內回覆
-
find: -printf %h drops a doubled slash可能已有人在做 @qodelicious 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆