| 95 | } |
| 96 | |
| 97 | std::string FormatScriptFlags(unsigned int flags) |
| 98 | { |
| 99 | if (flags == 0) { |
| 100 | return ""; |
| 101 | } |
| 102 | std::string ret; |
| 103 | std::map<std::string, unsigned int>::const_iterator it = mapFlagNames.begin(); |
| 104 | while (it != mapFlagNames.end()) { |
| 105 | if (flags & it->second) { |
| 106 | ret += it->first + ","; |
| 107 | } |
| 108 | it++; |
| 109 | } |
| 110 | return ret.substr(0, ret.size() - 1); |
| 111 | } |
| 112 | |
| 113 | /* |
| 114 | * Check that the input scripts of a transaction are valid/invalid as expected. |