refactor: remove unneeded calls to strprintf()

This commit is contained in:
fanquake
2021-12-14 10:09:42 +08:00
parent 5dd28e5cff
commit eca159c305
4 changed files with 5 additions and 5 deletions

View File

@@ -184,7 +184,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