Review report

core: PR #36386

1 suggestion

Optional improvements

Link

[suggestion] · Oversized-script test leaves payload skipping unchecked

The new unit test would still pass if the oversized fallback omitted s.ignore(nSize) or skipped too few payload bytes.

Location: src/test/compress_tests.cpp:178 (head).

Details and suggested fix

The fixture serializes a single oversized script, but after decoding it checks only restored. Assigning OP_RETURN satisfies both post-decode assertions even if payload bytes remain unread, and neither DataStream nor the formatter checks that the stream is exhausted. Add BOOST_CHECK(oversized_compressed.empty()); after the decode to verify that the full payload was consumed. Skipping beyond the payload already throws in this fixture. The skip logic is unchanged from base, so this is a test-strengthening suggestion.


Coverage details