mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Merge pull request #5500 from vijaydasmp/bp22_5
backport: Merge bitcoin#20468, 20568, 20606
This commit is contained in:
commit
fa40fc676d
@ -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 }')"
|
||||
|
||||
|
@ -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);
|
||||
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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";
|
||||
|
@ -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)
|
||||
|
@ -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, "", "",
|
||||
|
@ -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,
|
||||
|
@ -41,6 +41,8 @@ class EstimateFeeTest(BitcoinTestFramework):
|
||||
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)
|
||||
|
@ -45,7 +45,6 @@ MAX_MONEY = 21000000 * COIN
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user