mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-20 04:30:31 +01:00
refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)
HexStr can be called with anything that bas `begin()` and `end()` functions, so clean up the redundant calls.
This commit is contained in:
@@ -817,7 +817,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
|
||||
create_time = FormatISO8601DateTime(it->second.nCreateTime);
|
||||
}
|
||||
if(spk_man.GetCScript(scriptid, script)) {
|
||||
file << strprintf("%s %s script=1", HexStr(script.begin(), script.end()), create_time);
|
||||
file << strprintf("%s %s script=1", HexStr(script), create_time);
|
||||
file << strprintf(" # addr=%s\n", address);
|
||||
}
|
||||
}
|
||||
@@ -1193,7 +1193,7 @@ static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, con
|
||||
// Check whether we have any work to do
|
||||
for (const CScript& script : script_pub_keys) {
|
||||
if (pwallet->IsMine(script) & ISMINE_SPENDABLE) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script (\"" + HexStr(script.begin(), script.end()) + "\")");
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script (\"" + HexStr(script) + "\")");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user