mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
refactor: Make HexStr take a span
Make HexStr take a span of bytes, instead of an awkward pair of templated iterators.
This commit is contained in:
@@ -48,13 +48,14 @@ std::string FormatScript(const CScript& script)
|
||||
}
|
||||
}
|
||||
if (vch.size() > 0) {
|
||||
ret += strprintf("0x%x 0x%x ", HexStr(it2, it - vch.size()), HexStr(it - vch.size(), it));
|
||||
ret += strprintf("0x%x 0x%x ", HexStr(std::vector<uint8_t>(it2, it - vch.size())),
|
||||
HexStr(std::vector<uint8_t>(it - vch.size(), it)));
|
||||
} else {
|
||||
ret += strprintf("0x%x ", HexStr(it2, it));
|
||||
ret += strprintf("0x%x ", HexStr(std::vector<uint8_t>(it2, it)));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
ret += strprintf("0x%x ", HexStr(it2, script.end()));
|
||||
ret += strprintf("0x%x ", HexStr(std::vector<uint8_t>(it2, script.end())));
|
||||
break;
|
||||
}
|
||||
return ret.substr(0, ret.size() - 1);
|
||||
|
||||
Reference in New Issue
Block a user