mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +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:
@@ -779,7 +779,7 @@ static UniValue getblockheader(const JSONRPCRequest& request)
|
||||
{
|
||||
CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssBlock << pblockindex->GetBlockHeader();
|
||||
std::string strHex = HexStr(ssBlock.begin(), ssBlock.end());
|
||||
std::string strHex = HexStr(ssBlock);
|
||||
return strHex;
|
||||
}
|
||||
|
||||
@@ -905,7 +905,7 @@ static UniValue getblock(const JSONRPCRequest& request)
|
||||
{
|
||||
CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
|
||||
ssBlock << block;
|
||||
std::string strHex = HexStr(ssBlock.begin(), ssBlock.end());
|
||||
std::string strHex = HexStr(ssBlock);
|
||||
return strHex;
|
||||
}
|
||||
|
||||
@@ -2159,7 +2159,7 @@ UniValue scantxoutset(const JSONRPCRequest& request)
|
||||
UniValue unspent(UniValue::VOBJ);
|
||||
unspent.pushKV("txid", outpoint.hash.GetHex());
|
||||
unspent.pushKV("vout", (int32_t)outpoint.n);
|
||||
unspent.pushKV("scriptPubKey", HexStr(txo.scriptPubKey.begin(), txo.scriptPubKey.end()));
|
||||
unspent.pushKV("scriptPubKey", HexStr(txo.scriptPubKey));
|
||||
unspent.pushKV("desc", descriptors[txo.scriptPubKey]);
|
||||
unspent.pushKV("amount", ValueFromAmount(txo.nValue));
|
||||
unspent.pushKV("height", (int32_t)coin.nHeight);
|
||||
|
||||
Reference in New Issue
Block a user