def index.page.footer.finish
mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:1489
import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
import Base
import mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend as SHA
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
1489def index.page.footer.finish(
1490 file: File,
1491 +total: U32,
1492 +index_length: U32,
1493 footer: Bytes.Bytes,
1494 root_hash: SHA.Stream,
1495 valid_index: Bool
1496) -> IO(Result<&1, &1, U32 & String, Step>):
1497 match valid_index:
1498 case False{}:
1499 close.failed(file, corruption("byte SST serialized index mismatch"))
1500 case True{}:
1501 next.trailer.finish.root.digest(file, total, index_length, footer,
1502 SHA.stream.finish(root_hash))