Changeset View
Changeset View
Standalone View
Standalone View
src/core_write.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | while (it != script.end()) { | ||||
std::string str(GetOpName(op)); | std::string str(GetOpName(op)); | ||||
if (str.substr(0, 3) == std::string("OP_")) { | if (str.substr(0, 3) == std::string("OP_")) { | ||||
ret += str.substr(3, std::string::npos) + " "; | ret += str.substr(3, std::string::npos) + " "; | ||||
continue; | continue; | ||||
} | } | ||||
} | } | ||||
if (vch.size() > 0) { | if (vch.size() > 0) { | ||||
ret += strprintf("0x%x 0x%x ", HexStr(it2, it - vch.size()), | ret += strprintf( | ||||
HexStr(it - vch.size(), it)); | "0x%x 0x%x ", | ||||
HexStr(std::vector<uint8_t>(it2, it - vch.size())), | |||||
HexStr(std::vector<uint8_t>(it - vch.size(), it))); | |||||
} else { | } else { | ||||
ret += strprintf("0x%x ", HexStr(it2, it)); | ret += | ||||
strprintf("0x%x ", HexStr(std::vector<uint8_t>(it2, it))); | |||||
} | } | ||||
continue; | continue; | ||||
} | } | ||||
ret += strprintf("0x%x ", HexStr(it2, script.end())); | ret += | ||||
strprintf("0x%x ", HexStr(std::vector<uint8_t>(it2, script.end()))); | |||||
break; | break; | ||||
} | } | ||||
return ret.substr(0, ret.size() - 1); | return ret.substr(0, ret.size() - 1); | ||||
} | } | ||||
const std::map<uint8_t, std::string> mapSigHashTypes = { | const std::map<uint8_t, std::string> mapSigHashTypes = { | ||||
{SIGHASH_ALL, "ALL"}, | {SIGHASH_ALL, "ALL"}, | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |