Skip to content
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

Add DAEMON_NAME, WALLET_TOOL_NAME constants and use them in place of some uses of PRODUCT_NAME or "zcashd"/"zcashd-wallet-tool" #6813

Open
daira opened this issue Jan 4, 2024 · 1 comment · May be fixed by #6814
Assignees
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@daira
Copy link
Contributor

daira commented Jan 4, 2024

This is a follow-up to #6812. Some of the uses of PRODUCT_NAME (which is set to "Zcash") would make more sense as "zcashd". Add a DAEMON_NAME constant set to "zcashd" and change PRODUCT_NAME to DAEMON_NAME in the relevant places.

@daira daira added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Jan 4, 2024
@daira daira self-assigned this Jan 4, 2024
@daira
Copy link
Contributor Author

daira commented Jan 4, 2024

In addition to the uses of PACKAGE_NAME added in #6812 that I commented on when reviewing that PR, and the pre-existing uses of PACKAGE_NAME identified in #6812 (comment) , I think these are the relevant uses of "zcashd" and "zcashd-wallet-tool" in existing strings for C++ and .rc files:

./src/metrics.cpp:622:        std::cout << strprintf(_("Thank you for running a %s zcashd %s node!"), WhichNetwork(), FormatFullVersion()) << std::endl;
./src/wallet/wallet.cpp:6551:    strUsage += HelpMessageOpt("-walletrequirebackup=<bool>", _("By default, the wallet will not allow generation of new spending keys & addresses from the mnemonic seed until the backup of that seed has been confirmed with the `zcashd-wallet-tool` utility. A user may start zcashd with `-walletrequirebackup=false` to allow generation of spending keys even if the backup has not yet been confirmed."));
./src/wallet/rpcdump.cpp:539:            "1. \"filename\"    (string, required) The filename, saved in folder set by zcashd -exportdir option\n"
./src/wallet/rpcdump.cpp:558:        throw JSONRPCError(RPC_WALLET_ERROR, "Cannot export wallet until the zcashd -exportdir option has been set");
./src/wallet/rpcwallet.cpp:104:                "by using zcashd-wallet-tool first."
./src/wallet/rpcwallet.cpp:521:            "regularly. If your wallet was created using zcashd version 4.7.0 \n"
./src/wallet/rpcwallet.cpp:2076:            "zcashd wallet encryption is experimental, and should be used with caution.\n"
./src/wallet/rpcwallet.cpp:2183:            "users. Please use the zcashd-wallet-tool utility (built or installed in the same directory\n"
./src/wallet/rpcwallet.cpp:2184:            "as zcashd) instead. In particular, this method should not be used from zcash-cli, in order\n"
./src/wallet/rpcwallet.cpp:2187:            "which can be obtained by making a call to z_exportwallet. The zcashd embedded wallet\n"
./src/wallet/asyncrpcoperation_common.cpp:203:                    "zcashd with `-maxtxfee` to adjust this limit.",
./src/gtest/test_rpc.cpp:36:        "To enable it, restart zcashd with the following command line options:\n"
./src/gtest/test_rpc.cpp:44:        "To enable it, restart zcashd with the following command line options:\n"
./src/gtest/test_rpc.cpp:57:        "To enable it, restart zcashd with the following command line options:\n"
./src/bitcoind.cpp:88:                  "  zcashd [options]                     " + _("Start Zcash Daemon") + "\n";
./src/bitcoind.cpp:110:                (_("Before starting zcashd, you need to create a configuration file:\n"
./src/bitcoind.cpp:113:                   "configuration of zcashd. But requiring a configuration file to start ensures\n"
./src/bitcoind.cpp:114:                   "that zcashd won't accidentally compromise your privacy if there was a default\n"
./src/bitcoind.cpp:154:            fprintf(stderr, "Error: There is no RPC client functionality in zcashd. Use the zcash-cli utility instead.\n");
./src/bitcoind-res.rc:20:            VALUE "FileDescription",    "zcashd (Zcash node with a JSON-RPC server)"
./src/bitcoind-res.rc:22:            VALUE "InternalName",       "zcashd"
./src/bitcoind-res.rc:25:            VALUE "OriginalFilename",   "zcashd.exe"
./src/bitcoind-res.rc:26:            VALUE "ProductName",        "zcashd"
./src/main.cpp:903:                    error("ContextualCheckTransaction(): transaction is expired. Resending when caught up with the blockchain, or manually setting the zcashd txexpirydelta parameter may help."),
./src/rpc/server.cpp:575:        "To enable it, restart zcashd with the following command line options:\n"
./src/rpc/mining.cpp:519:        throw JSONRPCError(RPC_METHOD_NOT_FOUND, "zcashd compiled without wallet and -mineraddress not set");

For the ones that say "zcashd-wallet-tool", add a separate WALLET_TOOL_NAME constant.

Also, all the uses of "zcashd" in strings in src/rust/bin/wallet_tool.rs.

(I have not included the "zcashd." prefix for metrics names, since those should probably stay the same for a hypothetical zcashd fork.)

@daira daira changed the title Change PRODUCT_NAME to DAEMON_NAME in some places Add a DAEMON_NAME constant and use it in place of some uses of PRODUCT_NAME or "zcashd" Jan 4, 2024
@daira daira changed the title Add a DAEMON_NAME constant and use it in place of some uses of PRODUCT_NAME or "zcashd" Add DAEMON_NAME, WALLET_TOOL_NAME constants and use them in place of some uses of PRODUCT_NAME or "zcashd"/"zcashd-wallet-tool" Jan 4, 2024
@daira daira linked a pull request Jan 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant