mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +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:
@@ -305,7 +305,7 @@ static UniValue gettxoutproof(const JSONRPCRequest& request)
|
||||
CDataStream ssMB(SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS);
|
||||
CMerkleBlock mb(block, setTxids);
|
||||
ssMB << mb;
|
||||
std::string strHex = HexStr(ssMB.begin(), ssMB.end());
|
||||
std::string strHex = HexStr(ssMB);
|
||||
return strHex;
|
||||
}
|
||||
|
||||
@@ -1186,7 +1186,7 @@ UniValue decodepsbt(const JSONRPCRequest& request)
|
||||
if (!input.final_script_witness.IsNull()) {
|
||||
UniValue txinwitness(UniValue::VARR);
|
||||
for (const auto& item : input.final_script_witness.stack) {
|
||||
txinwitness.push_back(HexStr(item.begin(), item.end()));
|
||||
txinwitness.push_back(HexStr(item));
|
||||
}
|
||||
in.pushKV("final_scriptwitness", txinwitness);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user