diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py index 16aa18c0409..c39fbcf27a5 100755 --- a/contrib/devtools/security-check.py +++ b/contrib/devtools/security-check.py @@ -121,7 +121,7 @@ def check_ELF_FORTIFY(binary) -> bool: # bitcoin-util and elements-util do not currently contain any fortified functions # (the utility binaries are intentionally kept minimal) - if any('bitcoin-util utility version' in s for s in binary.strings): + if any('elements-util utility version' in s for s in binary.strings): return True chk_funcs = set() diff --git a/contrib/signet/README.md b/contrib/signet/README.md index cd0cae6d509..fb0d999b65e 100644 --- a/contrib/signet/README.md +++ b/contrib/signet/README.md @@ -7,11 +7,11 @@ getcoins.py A script to call a faucet to get Signet coins. -Syntax: `getcoins.py [-h|--help] [-c|--cmd=] [-f|--faucet=] [-a|--addr=] [-p|--password=] [--] []` +Syntax: `getcoins.py [-h|--help] [-c|--cmd=] [-f|--faucet=] [-a|--addr=] [-p|--password=] [--] []` -* `--cmd` lets you customize the bitcoin-cli path. By default it will look for it in the PATH +* `--cmd` lets you customize the elements-cli path. By default it will look for it in the PATH * `--faucet` lets you specify which faucet to use; the faucet is assumed to be compatible with https://github.com/kallewoof/bitcoin-faucet -* `--addr` lets you specify a Signet address; by default, the address must be a bech32 address. This and `--cmd` above complement each other (i.e. you do not need `bitcoin-cli` if you use `--addr`) +* `--addr` lets you specify a Signet address; by default, the address must be a bech32 address. This and `--cmd` above complement each other (i.e. you do not need `elements-cli` if you use `--addr`) * `--password` lets you specify a faucet password; this is handy if you are in a classroom and set up your own faucet for your students; (above faucet does not limit by IP when password is enabled) If using the default network, invoking the script with no arguments should be sufficient under normal @@ -24,7 +24,7 @@ miner You will first need to pick a difficulty target. Since signet chains are primarily protected by a signature rather than proof of work, there is no need to spend as much energy as possible mining, however you may wish to choose to spend more time than the absolute minimum. The calibrate subcommand can be used to pick a target appropriate for your hardware, eg: MINER="./contrib/signet/miner" - GRIND="./build/bin/bitcoin-util grind" + GRIND="./build/bin/elements-util grind" $MINER calibrate --grind-cmd="$GRIND" nbits=1e00f403 for 25s average mining time @@ -32,7 +32,7 @@ It defaults to estimating an nbits value resulting in 25s average time to find a To mine the first block in your custom chain, you can run: - CLI="./build/bin/bitcoin-cli -conf=mysignet.conf" + CLI="./build/bin/elements-cli -conf=mysignet.conf" ADDR=$($CLI -signet getnewaddress) NBITS=1e00f403 $MINER --cli="$CLI" generate --grind-cmd="$GRIND" --address="$ADDR" --nbits=$NBITS diff --git a/contrib/signet/getcoins.py b/contrib/signet/getcoins.py index 19751ae2695..ad7a3ecad9a 100755 --- a/contrib/signet/getcoins.py +++ b/contrib/signet/getcoins.py @@ -68,15 +68,15 @@ def print_image(img, threshold=128): line.append(chr(ch)) print(''.join(line)) -parser = argparse.ArgumentParser(description='Script to get coins from a faucet.', epilog='You may need to start with double-dash (--) when providing bitcoin-cli arguments.') -parser.add_argument('-c', '--cmd', dest='cmd', default='bitcoin-cli', help='bitcoin-cli command to use') +parser = argparse.ArgumentParser(description='Script to get coins from a faucet.', epilog='You may need to start with double-dash (--) when providing elements-cli arguments.') +parser.add_argument('-c', '--cmd', dest='cmd', default='elements-cli', help='elements-cli command to use') parser.add_argument('-f', '--faucet', dest='faucet', default=DEFAULT_GLOBAL_FAUCET, help='URL of the faucet') parser.add_argument('-g', '--captcha', dest='captcha', default=DEFAULT_GLOBAL_CAPTCHA, help='URL of the faucet captcha, or empty if no captcha is needed') parser.add_argument('-a', '--addr', dest='addr', default='', help='Bitcoin address to which the faucet should send') parser.add_argument('-p', '--password', dest='password', default='', help='Faucet password, if any') parser.add_argument('-n', '--amount', dest='amount', default='0.001', help='Amount to request (0.001-0.1, default is 0.001)') parser.add_argument('-i', '--imagemagick', dest='imagemagick', default=CONVERT, help='Path to imagemagick convert utility') -parser.add_argument('bitcoin_cli_args', nargs='*', help='Arguments to pass on to bitcoin-cli (default: -signet)') +parser.add_argument('bitcoin_cli_args', nargs='*', help='Arguments to pass on to elements-cli (default: -signet)') args = parser.parse_args() diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 86fa47d7eb1..65e487ce326 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -86,7 +86,7 @@ static void SetupCliArgs(ArgsManager& argsman) argsman.AddArg("-generate", strprintf("Generate blocks, equivalent to RPC getnewaddress followed by RPC generatetoaddress. Optional positional integer " "arguments are number of blocks to generate (default: %s) and maximum iterations to try (default: %s), equivalent to " - "RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000", + "RPC generatetoaddress nblocks and maxtries arguments. Example: elements-cli -generate 4 1000", DEFAULT_NBLOCKS, DEFAULT_MAX_TRIES), ArgsManager::ALLOW_ANY, OptionsCategory::CLI_COMMANDS); argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total, after filtering for quality and recency. The total number of addresses known to the node may be higher.", ArgsManager::ALLOW_ANY, OptionsCategory::CLI_COMMANDS); @@ -502,15 +502,15 @@ class NetinfoRequestHandler : public BaseRequestHandler if (ParseUInt8(args.at(0), &n)) { m_details_level = std::min(n, NETINFO_MAX_LEVEL); } else { - throw std::runtime_error(strprintf("invalid -netinfo level argument: %s\nFor more information, run: bitcoin-cli -netinfo help", args.at(0))); + throw std::runtime_error(strprintf("invalid -netinfo level argument: %s\nFor more information, run: elements-cli -netinfo help", args.at(0))); } if (args.size() > 1) { if (std::string_view s{args.at(1)}; n && (s == "o" || s == "outonly")) { m_outbound_only_selected = true; } else if (n) { - throw std::runtime_error(strprintf("invalid -netinfo outonly argument: %s\nFor more information, run: bitcoin-cli -netinfo help", s)); + throw std::runtime_error(strprintf("invalid -netinfo outonly argument: %s\nFor more information, run: elements-cli -netinfo help", s)); } else { - throw std::runtime_error(strprintf("invalid -netinfo outonly argument: %s\nThe outonly argument is only valid for a level greater than 0 (the first argument). For more information, run: bitcoin-cli -netinfo help", s)); + throw std::runtime_error(strprintf("invalid -netinfo outonly argument: %s\nThe outonly argument is only valid for a level greater than 0 (the first argument). For more information, run: elements-cli -netinfo help", s)); } } } @@ -748,17 +748,17 @@ class NetinfoRequestHandler : public BaseRequestHandler "* The local addresses table lists each local address broadcast by the node, the port, and the score.\n\n" "Examples:\n\n" "Peer counts table of reachable networks and list of local addresses\n" - "> bitcoin-cli -netinfo\n\n" + "> elements-cli -netinfo\n\n" "The same, preceded by a peers listing without address and version columns\n" - "> bitcoin-cli -netinfo 1\n\n" + "> elements-cli -netinfo 1\n\n" "Full dashboard\n" - + strprintf("> bitcoin-cli -netinfo %d\n\n", NETINFO_MAX_LEVEL) + + + strprintf("> elements-cli -netinfo %d\n\n", NETINFO_MAX_LEVEL) + "Full dashboard, but with outbound peers only\n" - + strprintf("> bitcoin-cli -netinfo %d outonly\n\n", NETINFO_MAX_LEVEL) + + + strprintf("> elements-cli -netinfo %d outonly\n\n", NETINFO_MAX_LEVEL) + "Full live dashboard, adjust --interval or --no-title as needed (Linux)\n" - + strprintf("> watch --interval 1 --no-title bitcoin-cli -netinfo %d\n\n", NETINFO_MAX_LEVEL) + + + strprintf("> watch --interval 1 --no-title elements-cli -netinfo %d\n\n", NETINFO_MAX_LEVEL) + "See this help\n" - "> bitcoin-cli -netinfo help\n"}; + "> elements-cli -netinfo help\n"}; }; /** Process RPC generatetoaddress request. */ @@ -926,7 +926,7 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co } throw CConnectionFailed(strprintf("Could not connect to the server %s:%d%s\n\n" "Make sure the daemon server is running and that you are connecting to the correct RPC port.\n" - "Use \"bitcoin-cli -help\" for more info.", + "Use \"elements-cli -help\" for more info.", host, port, responseErrorMessage)); } else if (response.status == HTTP_UNAUTHORIZED) { if (failedToGetAuthCookie) { diff --git a/src/bitcoin-util.cpp b/src/bitcoin-util.cpp index 9d42430b1d9..a8bb57a74f7 100644 --- a/src/bitcoin-util.cpp +++ b/src/bitcoin-util.cpp @@ -52,16 +52,16 @@ static int AppInitUtil(ArgsManager& args, int argc, char* argv[]) if (HelpRequested(args) || args.GetBoolArg("-version", false)) { // First part of help message is specific to this utility - std::string strUsage = CLIENT_NAME " bitcoin-util utility version " + FormatFullVersion() + "\n"; + std::string strUsage = CLIENT_NAME " elements-util utility version " + FormatFullVersion() + "\n"; if (args.GetBoolArg("-version", false)) { strUsage += FormatParagraph(LicenseInfo()); } else { strUsage += "\n" - "The bitcoin-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below.\n" + "The elements-util tool provides elements related functionality that does not rely on the ability to access a running node. Available [commands] are listed below.\n" "\n" - "Usage: bitcoin-util [options] [command]\n" - "or: bitcoin-util [options] grind \n"; + "Usage: elements-util [options] [command]\n" + "or: elements-util [options] grind \n"; strUsage += "\n" + args.GetHelpMessage(); } diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index dcbe4bed1a6..5584d249796 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -179,7 +179,7 @@ def parse_args(self, test_file): parser.add_argument("--pdbonfailure", dest="pdbonfailure", default=False, action="store_true", help="Attach a python debugger if test fails") parser.add_argument("--usecli", dest="usecli", default=False, action="store_true", - help="use bitcoin-cli instead of RPC for all commands") + help="use elements-cli instead of RPC for all commands") parser.add_argument("--perf", dest="perf", default=False, action="store_true", help="profile running nodes with perf for the duration of the test") parser.add_argument("--valgrind", dest="valgrind", default=False, action="store_true", @@ -987,19 +987,19 @@ def skip_if_no_bdb(self): raise SkipTest("BDB has not been compiled.") def skip_if_no_wallet_tool(self): - """Skip the running test if bitcoin-wallet has not been compiled.""" + """Skip the running test if elements-wallet has not been compiled.""" if not self.is_wallet_tool_compiled(): - raise SkipTest("bitcoin-wallet has not been compiled") + raise SkipTest("elements-wallet has not been compiled") def skip_if_no_bitcoin_util(self): - """Skip the running test if bitcoin-util has not been compiled.""" + """Skip the running test if elements-util has not been compiled.""" if not self.is_bitcoin_util_compiled(): - raise SkipTest("bitcoin-util has not been compiled") + raise SkipTest("elements-util has not been compiled") def skip_if_no_cli(self): - """Skip the running test if bitcoin-cli has not been compiled.""" + """Skip the running test if elements-cli has not been compiled.""" if not self.is_cli_compiled(): - raise SkipTest("bitcoin-cli has not been compiled.") + raise SkipTest("elements-cli has not been compiled.") def skip_if_no_previous_releases(self): """Skip the running test if previous releases are not available.""" @@ -1020,7 +1020,7 @@ def skip_if_no_external_signer(self): raise SkipTest("external signer support has not been compiled.") def is_cli_compiled(self): - """Checks whether bitcoin-cli was compiled.""" + """Checks whether elements-cli was compiled.""" return self.config["components"].getboolean("ENABLE_CLI") def is_external_signer_compiled(self): @@ -1040,11 +1040,11 @@ def is_specified_wallet_compiled(self): return self.is_bdb_compiled() def is_wallet_tool_compiled(self): - """Checks whether bitcoin-wallet was compiled.""" + """Checks whether elements-wallet was compiled.""" return self.config["components"].getboolean("ENABLE_WALLET_TOOL") def is_bitcoin_util_compiled(self): - """Checks whether bitcoin-util was compiled.""" + """Checks whether elements-util was compiled.""" return self.config["components"].getboolean("ENABLE_BITCOIN_UTIL") def is_zmq_compiled(self): diff --git a/test/util/test_runner.py b/test/util/test_runner.py index d6faf18c5c6..2ef53489a50 100755 --- a/test/util/test_runner.py +++ b/test/util/test_runner.py @@ -74,9 +74,9 @@ def bctest(testDir, testObj, buildenv): """ # Get the exec names and arguments execprog = os.path.join(buildenv["BUILDDIR"], "bin", testObj["exec"] + buildenv["EXEEXT"]) - if testObj["exec"] == "./bitcoin-util": + if testObj["exec"] == "./elements-util": execprog = os.getenv("BITCOINUTIL", default=execprog) - elif testObj["exec"] == "./bitcoin-tx": + elif testObj["exec"] == "./elements-tx": execprog = os.getenv("BITCOINTX", default=execprog) execargs = testObj['args']