Skip to content

Commit

Permalink
Merge fbb2bee into merged_master (Bitcoin PR #20067)
Browse files Browse the repository at this point in the history
  • Loading branch information
apoelstra committed May 6, 2021
2 parents 9662170 + fbb2bee commit 155b09b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <version.h>

#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/split.hpp>

#include <algorithm>
Expand All @@ -40,8 +39,9 @@ CScript ParseScript(const std::string& s)
continue;
mapOpNames[strName] = static_cast<opcodetype>(op);
// Convenience: OP_ADD and just ADD are both recognized:
boost::algorithm::replace_first(strName, "OP_", "");
mapOpNames[strName] = static_cast<opcodetype>(op);
if (strName.compare(0, 3, "OP_") == 0) { // strName starts with "OP_"
mapOpNames[strName.substr(3)] = static_cast<opcodetype>(op);
}
}
}

Expand Down

0 comments on commit 155b09b

Please sign in to comment.