Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions contrib/devtools/gen-manpages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ BITCOINQT=${BITCOINQT:-$BINDIR/qt/dash-qt}

[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1

# Don't allow man pages to be generated for binaries built from a dirty tree
DIRTY=""
for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $WALLET_TOOL $BITCOINQT; do
VERSION_OUTPUT=$($cmd --version)
if [[ $VERSION_OUTPUT == *"dirty"* ]]; then
DIRTY="${DIRTY}${cmd}\n"
fi
done
if [ -n "$DIRTY" ]
then
echo -e "WARNING: the following binaries were built from a dirty tree:\n"
echo -e $DIRTY
echo "man pages generated from dirty binaries should NOT be committed."
echo "To properly generate man pages, please commit your changes to the above binaries, rebuild them, then run this script again."
fi

# The autodetected version git tag can screw up manpage output a little bit
read -r -a BTCVER <<< "$($BITCOINCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }')"

Expand Down
16 changes: 10 additions & 6 deletions src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static void SetupBitcoinTxArgs(ArgsManager &argsman)
{
SetupHelpOptions(argsman);

argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-create", "Create new, empty TX.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-json", "Select JSON output", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-txid", "Output only the hex-encoded transaction id of the resultant transaction.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
Expand Down Expand Up @@ -98,13 +99,16 @@ static int AppInitRawTx(int argc, char* argv[])

fCreateBlank = gArgs.GetBoolArg("-create", false);

if (argc < 2 || HelpRequested(gArgs)) {
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
// First part of help message is specific to this utility
std::string strUsage = PACKAGE_NAME " dash-tx utility version " + FormatFullVersion() + "\n\n" +
"Usage: dash-tx [options] <hex-tx> [commands] Update hex-encoded dash transaction\n" +
"or: dash-tx [options] -create [commands] Create hex-encoded dash transaction\n" +
"\n";
strUsage += gArgs.GetHelpMessage();
std::string strUsage = PACKAGE_NAME " dash-tx utility version " + FormatFullVersion() + "\n";
if (!gArgs.IsArgSet("-version")) {
strUsage += "\n"
"Usage: dash-tx [options] <hex-tx> [commands] Update hex-encoded dash transaction\n"
"or: dash-tx [options] -create [commands] Create hex-encoded dash transaction\n"
"\n";
strUsage += gArgs.GetHelpMessage();
}

tfm::format(std::cout, "%s", strUsage);

Expand Down
23 changes: 13 additions & 10 deletions src/bitcoin-wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ static void SetupWalletToolArgs(ArgsManager& argsman)
SetupHelpOptions(argsman);
SetupChainParamsBaseOptions(argsman);

argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-wallet=<wallet-name>", "Specify wallet name", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-debug=<category>", "Output debugging information (default: 0).", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
Expand All @@ -42,16 +43,18 @@ static bool WalletAppInit(int argc, char* argv[])
tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error_message);
return false;
}
if (argc < 2 || HelpRequested(gArgs)) {
std::string usage = strprintf("%s dash-wallet version", PACKAGE_NAME) + " " + FormatFullVersion() + "\n\n" +
"dash-wallet is an offline tool for creating and interacting with " PACKAGE_NAME " wallet files.\n" +
"By default dash-wallet will act on wallets in the default mainnet wallet directory in the datadir.\n" +
"To change the target wallet, use the -datadir, -wallet and -testnet/-regtest arguments.\n\n" +
"Usage:\n" +
" dash-wallet [options] <command>\n\n" +
gArgs.GetHelpMessage();

tfm::format(std::cout, "%s", usage);
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
std::string strUsage = strprintf("%s dash-wallet version", PACKAGE_NAME) + " " + FormatFullVersion() + "\n";
if (!gArgs.IsArgSet("-version")) {
strUsage += "\n"
"dash-wallet is an offline tool for creating and interacting with " PACKAGE_NAME " wallet files.\n"
"By default dash-wallet will act on wallets in the default mainnet wallet directory in the datadir.\n"
"To change the target wallet, use the -datadir, -wallet and -testnet/-regtest arguments.\n\n"
"Usage:\n"
" dash-wallet [options] <command>\n";
strUsage += "\n" + gArgs.GetHelpMessage();
}
tfm::format(std::cout, "%s", strUsage);
return false;
}

Expand Down
10 changes: 5 additions & 5 deletions src/bitcoind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ static bool AppInit(int argc, char* argv[])
if (HelpRequested(args) || args.IsArgSet("-version")) {
std::string strUsage = PACKAGE_NAME " version " + FormatFullVersion() + "\n";

if (args.IsArgSet("-version")) {
strUsage += FormatParagraph(LicenseInfo()) + "\n";
} else {
strUsage += "\nUsage: dashd [options] Start " PACKAGE_NAME "\n";
strUsage += "\n" + args.GetHelpMessage();
if (!args.IsArgSet("-version")) {
strUsage += FormatParagraph(LicenseInfo()) + "\n"
"\nUsage: dashd [options] Start " PACKAGE_NAME "\n"
"\n";
strUsage += args.GetHelpMessage();
}

tfm::format(std::cout, "%s", strUsage);
Expand Down
1 change: 0 additions & 1 deletion src/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ static std::string serviceFlagToStr(size_t bit)
switch ((ServiceFlags)service_flag) {
case NODE_NONE: abort(); // impossible
case NODE_NETWORK: return "NETWORK";
case NODE_GETUTXO: return "GETUTXO";
case NODE_BLOOM: return "BLOOM";
case NODE_COMPACT_FILTERS: return "COMPACT_FILTERS";
case NODE_NETWORK_LIMITED: return "NETWORK_LIMITED";
Expand Down
4 changes: 0 additions & 4 deletions src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,6 @@ enum ServiceFlags : uint64_t {
// NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently
// set by all Dash Core non pruned nodes, and is unset by SPV clients or other light clients.
NODE_NETWORK = (1 << 0),
// NODE_GETUTXO means the node is capable of responding to the getutxo protocol request.
// Dash Core does not support this but a patch set called Bitcoin XT does.
// See BIP 64 for details on how this is implemented.
NODE_GETUTXO = (1 << 1),
// NODE_BLOOM means the node is capable and willing to handle bloom-filtered connections.
// Dash Core nodes used to support this by default, without advertising this bit,
// but no longer do as of protocol version 70201 (= NO_BLOOM_VERSION)
Expand Down
8 changes: 3 additions & 5 deletions src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,15 +1074,13 @@ static UniValue estimatesmartfee(const JSONRPCRequest& request)
"for which the estimate is valid.\n",
{
{"conf_target", RPCArg::Type::NUM, RPCArg::Optional::NO, "Confirmation target in blocks (1 - 1008)"},
{"estimate_mode", RPCArg::Type::STR, /* default */ "CONSERVATIVE", "The fee estimate mode.\n"
{"estimate_mode", RPCArg::Type::STR, /* default */ "conservative", "The fee estimate mode.\n"
" Whether to return a more conservative estimate which also satisfies\n"
" a longer history. A conservative estimate potentially returns a\n"
" higher feerate and is more likely to be sufficient for the desired\n"
" target, but is not as responsive to short term drops in the\n"
" prevailing fee market. Must be one of:\n"
" \"UNSET\"\n"
" \"ECONOMICAL\"\n"
" \"CONSERVATIVE\""},
" prevailing fee market. Must be one of (case insensitive):\n"
"\"" + FeeModes("\"\n\"") + "\""},
},
RPCResult{
RPCResult::Type::OBJ, "", "",
Expand Down
1 change: 0 additions & 1 deletion src/test/util/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ struct ConnmanTestMsg : public CConnman {
constexpr ServiceFlags ALL_SERVICE_FLAGS[]{
NODE_NONE,
NODE_NETWORK,
NODE_GETUTXO,
NODE_BLOOM,
NODE_COMPACT_FILTERS,
NODE_NETWORK_LIMITED,
Expand Down
2 changes: 2 additions & 0 deletions test/functional/rpc_estimatefee.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def run_test(self):
self.nodes[0].estimatesmartfee(1)
# self.nodes[0].estimatesmartfee(1, None)
self.nodes[0].estimatesmartfee(1, 'ECONOMICAL')
self.nodes[0].estimatesmartfee(1, 'unset')
self.nodes[0].estimatesmartfee(1, 'conservative')

self.nodes[0].estimaterawfee(1)
self.nodes[0].estimaterawfee(1, None)
Expand Down
1 change: 0 additions & 1 deletion test/functional/test_framework/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
BIP125_SEQUENCE_NUMBER = 0xfffffffd # Sequence number that is BIP 125 opt-in and BIP 68-opt-out

NODE_NETWORK = (1 << 0)
NODE_GETUTXO = (1 << 1)
NODE_BLOOM = (1 << 2)
NODE_COMPACT_FILTERS = (1 << 6)
NODE_NETWORK_LIMITED = (1 << 10)
Expand Down