-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: #22764 #28597 #7238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
backport: #22764 #28597 #7238
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -634,7 +634,9 @@ static RPCHelpMan createwallet() | |||||||||||
| {"blank", RPCArg::Type::BOOL, RPCArg::Default{false}, "Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using upgradetohd (by mnemonic) or sethdseed (WIF private key)."}, | ||||||||||||
| {"passphrase", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "Encrypt the wallet with this passphrase."}, | ||||||||||||
| {"avoid_reuse", RPCArg::Type::BOOL, RPCArg::Default{false}, "Keep track of coin reuse, and treat dirty and clean coins differently with privacy considerations in mind."}, | ||||||||||||
| {"descriptors", RPCArg::Type::BOOL, RPCArg::Default{true}, "Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation."}, | ||||||||||||
| {"descriptors", RPCArg::Type::BOOL, RPCArg::Default{true}, "Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation." | ||||||||||||
| " Setting this to \"false\" creates a legacy wallet. This is only possible with -deprecatedrpc=create_bdb, because legacy wallet creation is deprecated and" | ||||||||||||
| " support for creating and opening legacy wallets will be removed in a future release."}, | ||||||||||||
| {"load_on_startup", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED_NAMED_ARG, "Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged."}, | ||||||||||||
| {"external_signer", RPCArg::Type::BOOL, RPCArg::Default{false}, "Use an external signer such as a hardware wallet. Requires -signer to be configured. Wallet creation will fail if keys cannot be fetched. Requires disable_private_keys and descriptors set to true."}, | ||||||||||||
| }, | ||||||||||||
|
|
@@ -679,11 +681,17 @@ static RPCHelpMan createwallet() | |||||||||||
| if (!request.params[5].isNull() && request.params[6].isNull()) { | ||||||||||||
| throw JSONRPCError(RPC_INVALID_PARAMETER, "The createwallet RPC requires specifying the 'load_on_startup' flag when param 'descriptors' is specified. Dash Core v21 introduced this requirement due to breaking changes in the createwallet RPC."); | ||||||||||||
| } | ||||||||||||
| if (request.params[5].isNull() || request.params[5].get_bool()) { | ||||||||||||
| if (self.Arg<bool>("descriptors")) | ||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This line calls Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Blocking: Build break: Dash's This is a compile-time failure. The previous revision (23ac20e) correctly worked around this by using 💡 Suggested change
Suggested change
source: ['claude', 'codex'] 🤖 Fix this with AI agentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Blocking — self.Arg("descriptors") does not exist in Dash (4/4 agents converged) Dash's
Suggested change
|
||||||||||||
| { | ||||||||||||
| #ifndef USE_SQLITE | ||||||||||||
| throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without sqlite support (required for descriptor wallets)"); | ||||||||||||
| #endif | ||||||||||||
| flags |= WALLET_FLAG_DESCRIPTORS; | ||||||||||||
| } else { | ||||||||||||
| if (!context.chain->rpcEnableDeprecated("create_bdb")) { | ||||||||||||
| throw JSONRPCError(RPC_WALLET_ERROR, "BDB wallet creation is deprecated and will be removed in a future release." | ||||||||||||
| " In this release it can be re-enabled temporarily with the -deprecatedrpc=create_bdb setting."); | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
| if (!request.params[7].isNull() && request.params[7].get_bool()) { | ||||||||||||
| #ifdef ENABLE_EXTERNAL_SIGNER | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -419,6 +419,7 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect= | |||||||||||
| f.write("upnp=0\n") | ||||||||||||
| f.write("natpmp=0\n") | ||||||||||||
| f.write("shrinkdebugfile=0\n") | ||||||||||||
| f.write("deprecatedrpc=create_bdb\n") # Required to run the tests | ||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid enabling Line 422 makes every functional node allow deprecated legacy wallet creation, which can hide failures in tests that should validate the default rejection path (e.g., 🧪 Suggested fix (make deprecated RPC opt-in per test)-def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=True):
+def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=True, enable_create_bdb_deprecatedrpc=False):
@@
- f.write("deprecatedrpc=create_bdb\n") # Required to run the tests
+ if enable_create_bdb_deprecatedrpc:
+ f.write("deprecatedrpc=create_bdb\n")Then enable it only in tests that intentionally exercise legacy wallet creation. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Suggestion — Global deprecatedrpc=create_bdb prevents testing the new default behavior Adding |
||||||||||||
| # To reduce IO and consumed disk storage use tiny size for allocated blk and rev files | ||||||||||||
| f.write("tinyblk=1\n") | ||||||||||||
| # To improve SQLite wallet performance so that the tests don't timeout, use -unsafesqlitesync | ||||||||||||
|
|
||||||||||||
Uh oh!
There was an error while loading. Please reload this page.