refactor: use SpanReader in TestBlockAndIndex

`TestBlockAndIndex` still deserialized its fixed block fixture through `DataStream` and appended a dummy byte to avoid compaction after full consumption.

Use `SpanReader` for that fixture instead.
This removes the leftover dummy-byte workaround and reads the immutable fixture through a read-only view.
This commit is contained in:
Lőrinc
2026-04-07 23:32:05 +03:00
parent 61d678a6e3
commit b8eb6c2081

View File

@@ -31,10 +31,7 @@ struct TestBlockAndIndex {
TestBlockAndIndex()
{
DataStream stream{benchmark::data::block413567};
std::byte a{0};
stream.write({&a, 1}); // Prevent compaction
SpanReader stream{benchmark::data::block413567};
stream >> TX_WITH_WITNESS(block);
blockHash = block.GetHash();