| 55 | static const std::map<std::string, script_verify_flag_name>& mapFlagNames = ScriptFlagNamesToEnum(); |
| 56 | |
| 57 | script_verify_flags ParseScriptFlags(std::string strFlags) |
| 58 | { |
| 59 | script_verify_flags flags = SCRIPT_VERIFY_NONE; |
| 60 | if (strFlags.empty() || strFlags == "NONE") return flags; |
| 61 | |
| 62 | std::vector<std::string> words = SplitString(strFlags, ','); |
| 63 | for (const std::string& word : words) |
| 64 | { |
| 65 | if (!mapFlagNames.contains(word)) { |
| 66 | BOOST_ERROR("Bad test: unknown verification flag '" << word << "'"); |
| 67 | continue; |
| 68 | } |
| 69 | flags |= mapFlagNames.at(word); |
| 70 | } |
| 71 | return flags; |
| 72 | } |
| 73 | |
| 74 | // Check that all flags in STANDARD_SCRIPT_VERIFY_FLAGS are present in mapFlagNames. |
| 75 | bool CheckMapFlagNames() |
no test coverage detected