From 0a8aa626dd69a357e1b798b07b64cf4177a464a3 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 24 Jun 2020 17:26:47 +0200 Subject: refactor: Make HexStr take a span Make HexStr take a span of bytes, instead of an awkward pair of templated iterators. --- src/core_write.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core_write.cpp') diff --git a/src/core_write.cpp b/src/core_write.cpp index 34cfeecc6f..f9d918cb6d 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -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(it2, it - vch.size())), + HexStr(std::vector(it - vch.size(), it))); } else { - ret += strprintf("0x%x ", HexStr(it2, it)); + ret += strprintf("0x%x ", HexStr(std::vector(it2, it))); } continue; } - ret += strprintf("0x%x ", HexStr(it2, script.end())); + ret += strprintf("0x%x ", HexStr(std::vector(it2, script.end()))); break; } return ret.substr(0, ret.size() - 1); -- cgit v1.2.3