Skip to content

Commit 73b6171

Browse files
author
MacroFake
committed
Merge bitcoin#26272: test: Prevent UB in minisketch_tests.cpp
97007e2 test: Prevent UB in `minisketch_tests.cpp` (Hennadii Stepanov) Pull request description: [`std::optional::operator*`](https://en.cppreference.com/w/cpp/utility/optional/operator*), which follows after the changed line, can cause UB. This PR addresses bitcoin#26262 (comment) ACKs for top commit: stickies-v: ACK 97007e2 Tree-SHA512: a7dde8dac0cbdfa362fa1158b4564eccff9405852612227d581690c9a34084b3467ae6d4c0269262688d75339dcea90aaa38fccbba9be92d2643c2113860f3d6
2 parents 292f652 + 97007e2 commit 73b6171

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/minisketch_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE(minisketch_test)
4040
Minisketch sketch_c = std::move(sketch_ar);
4141
sketch_c.Merge(sketch_br);
4242
auto dec = sketch_c.Decode(errors);
43-
BOOST_CHECK(dec.has_value());
43+
BOOST_REQUIRE(dec.has_value());
4444
auto sols = std::move(*dec);
4545
std::sort(sols.begin(), sols.end());
4646
for (uint32_t i = 0; i < a_not_b; ++i) BOOST_CHECK_EQUAL(sols[i], start_a + i);

0 commit comments

Comments
 (0)