| 47 | (std::string("SIGHASH_FORKID"), (unsigned int)SCRIPT_ENABLE_SIGHASH_FORKID); |
| 48 | |
| 49 | unsigned int ParseScriptFlags(string strFlags) |
| 50 | { |
| 51 | if (strFlags.empty()) { |
| 52 | return 0; |
| 53 | } |
| 54 | unsigned int flags = 0; |
| 55 | vector<string> words; |
| 56 | boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(",")); |
| 57 | |
| 58 | BOOST_FOREACH(string word, words) |
| 59 | { |
| 60 | if (!mapFlagNames.count(word)) |
| 61 | BOOST_ERROR("Bad test: unknown verification flag '" << word << "'"); |
| 62 | flags |= mapFlagNames[word]; |
| 63 | } |
| 64 | |
| 65 | return flags; |
| 66 | } |
| 67 | |
| 68 | string FormatScriptFlags(unsigned int flags) |
| 69 | { |
no test coverage detected