Changeset View
Changeset View
Standalone View
Standalone View
src/core_read.cpp
Show All 20 Lines | |||||
#include <boost/algorithm/string/split.hpp> | #include <boost/algorithm/string/split.hpp> | ||||
CScript ParseScript(const std::string &s) { | CScript ParseScript(const std::string &s) { | ||||
CScript result; | CScript result; | ||||
static std::map<std::string, opcodetype> mapOpNames; | static std::map<std::string, opcodetype> mapOpNames; | ||||
if (mapOpNames.empty()) { | if (mapOpNames.empty()) { | ||||
for (int op = 0; op <= OP_NOP10; op++) { | for (int op = 0; op < FIRST_UNDEFINED_OP_VALUE; op++) { | ||||
// Allow OP_RESERVED to get into mapOpNames | // ignore all "PUSHDATA" ops, but dont ignore OP_RESERVED | ||||
if (op < OP_NOP && op != OP_RESERVED) { | if (op < OP_NOP && op != OP_RESERVED) { | ||||
continue; | continue; | ||||
} | } | ||||
const char *name = GetOpName((opcodetype)op); | const char *name = GetOpName((opcodetype)op); | ||||
if (strcmp(name, "OP_UNKNOWN") == 0) { | if (strcmp(name, "OP_UNKNOWN") == 0) { | ||||
continue; | continue; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |