mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge bitcoin/bitcoin#23766: refactor: remove unneeded calls to strprintf()
eca159c305c1ff3d9b806755026a23bf2aad9a48 refactor: remove unneeded calls to strprintf() (fanquake) Pull request description: ACKs for top commit: laanwj: Code review ACK eca159c305c1ff3d9b806755026a23bf2aad9a48 Tree-SHA512: 6f0b25dd6506f7223e3603f89c9d6e33feb9a7b524986146f70d10973b7a346830889656b37b2ab5cf78ddea458ca6979dd848403a900cb79f62a1494b968f99
This commit is contained in:
parent
763645ad2b
commit
e311662a2d
@ -61,7 +61,7 @@ void AddLoggingArgs(ArgsManager& argsman)
|
||||
argsman.AddArg("-debug=<category>", "Output debugging information (default: -nodebug, supplying <category> is optional). "
|
||||
"If <category> is not supplied or if <category> = 1, output all debugging information. <category> can be: " + LogInstance().LogCategoriesString() + ". This option can be specified multiple times to output multiple categories.",
|
||||
ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
||||
argsman.AddArg("-debugexclude=<category>", strprintf("Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except the specified category. This option can be specified multiple times to exclude multiple categories."), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
||||
argsman.AddArg("-debugexclude=<category>", "Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except the specified category. This option can be specified multiple times to exclude multiple categories.", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
||||
argsman.AddArg("-logips", strprintf("Include IP addresses in debug output (default: %u)", DEFAULT_LOGIPS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
||||
argsman.AddArg("-logtimestamps", strprintf("Prepend debug output with timestamp (default: %u)", DEFAULT_LOGTIMESTAMPS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
||||
#ifdef HAVE_THREAD_LOCAL
|
||||
|
@ -101,7 +101,7 @@ PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
|
||||
}
|
||||
);
|
||||
if (!MoneyRange(out_amt)) {
|
||||
result.SetInvalid(strprintf("PSBT is not valid. Output amount invalid"));
|
||||
result.SetInvalid("PSBT is not valid. Output amount invalid");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ static bool getScriptFromDescriptor(const std::string& descriptor, CScript& scri
|
||||
FlatSigningProvider provider;
|
||||
std::vector<CScript> scripts;
|
||||
if (!desc->Expand(0, key_provider, scripts, provider)) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Cannot derive script without private keys"));
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Cannot derive script without private keys");
|
||||
}
|
||||
|
||||
// Combo descriptors can have 2 or 4 scripts, so we can't just check scripts.size() == 1
|
||||
|
@ -443,13 +443,13 @@ static RPCHelpMan deriveaddresses()
|
||||
FlatSigningProvider provider;
|
||||
std::vector<CScript> scripts;
|
||||
if (!desc->Expand(i, key_provider, scripts, provider)) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Cannot derive script without private keys"));
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Cannot derive script without private keys");
|
||||
}
|
||||
|
||||
for (const CScript &script : scripts) {
|
||||
CTxDestination dest;
|
||||
if (!ExtractDestination(script, dest)) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Descriptor does not have a corresponding address"));
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Descriptor does not have a corresponding address");
|
||||
}
|
||||
|
||||
addresses.push_back(EncodeDestination(dest));
|
||||
|
Loading…
Reference in New Issue
Block a user