| 128 | const std::vector<script_verify_flags> ALL_FLAGS = AllFlags(); |
| 129 | |
| 130 | script_verify_flags ParseScriptFlags(const std::string& str) |
| 131 | { |
| 132 | if (str.empty()) return 0; |
| 133 | |
| 134 | script_verify_flags flags = 0; |
| 135 | std::vector<std::string> words = SplitString(str, ','); |
| 136 | |
| 137 | for (const std::string& word : words) { |
| 138 | auto it = FLAG_NAMES.find(word); |
| 139 | if (it == FLAG_NAMES.end()) throw std::runtime_error("Unknown verification flag " + word); |
| 140 | flags |= it->second; |
| 141 | } |
| 142 | |
| 143 | return flags; |
| 144 | } |
| 145 | |
| 146 | void Test(const std::string& str) |
| 147 | { |
no test coverage detected