Exclude each possible script verify flag from flags. Returns a set of these flag combinations that are valid and without duplicates. For example: if flags=1111 and the 4 possible flags are 0001, 0010, 0100, and 1000, this should return the set {0111, 1011, 1101, 1110}. Assumes that mapFlagNames contains all script verify flags.
| 177 | // 0001, 0010, 0100, and 1000, this should return the set {0111, 1011, 1101, 1110}. |
| 178 | // Assumes that mapFlagNames contains all script verify flags. |
| 179 | std::set<unsigned int> ExcludeIndividualFlags(unsigned int flags) |
| 180 | { |
| 181 | std::set<unsigned int> flags_combos; |
| 182 | for (const auto& pair : mapFlagNames) { |
| 183 | const unsigned int flags_excluding_one = TrimFlags(flags & ~(pair.second)); |
| 184 | if (flags != flags_excluding_one) { |
| 185 | flags_combos.insert(flags_excluding_one); |
| 186 | } |
| 187 | } |
| 188 | return flags_combos; |
| 189 | } |
| 190 | |
| 191 | BOOST_FIXTURE_TEST_SUITE(transaction_tests, BasicTestingSetup) |
| 192 |
no test coverage detected