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.
| 146 | // 0001, 0010, 0100, and 1000, this should return the set {0111, 1011, 1101, 1110}. |
| 147 | // Assumes that mapFlagNames contains all script verify flags. |
| 148 | std::set<script_verify_flags> ExcludeIndividualFlags(script_verify_flags flags) |
| 149 | { |
| 150 | std::set<script_verify_flags> flags_combos; |
| 151 | for (const auto& pair : mapFlagNames) { |
| 152 | script_verify_flags flags_excluding_one = TrimFlags(flags & ~(pair.second)); |
| 153 | if (flags != flags_excluding_one) { |
| 154 | flags_combos.insert(flags_excluding_one); |
| 155 | } |
| 156 | } |
| 157 | return flags_combos; |
| 158 | } |
| 159 | |
| 160 | BOOST_FIXTURE_TEST_SUITE(transaction_tests, BasicTestingSetup) |
| 161 |
no test coverage detected