def next.body.output.hash.results

mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:1131

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/ByteMemTable.bend as ByteMemTable
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

1131def next.body.output.hash.results(
1132  file: File,
1133  +size: Nat,
1134  header: Bytes.Bytes,
1135  +index_offset: Nat,
1136  +next_used: Nat,
1137  total: U32,
1138  block_count: U32,
1139  next_number: U32,
1140  next_decoded: U32,
1141  last_key: Maybe<&1, Bytes.Bytes>,
1142  entries: List<&1, ByteMemTable.Entry>,
1143  root_result: Result<&1, &1, SHA.StreamError, SHA.Stream>,
1144  index_hash: SHA.Stream,
1145  selected: Bool
1146) -> IO(Result<&1, &1, U32 & String, Step>):
1147  match root_result:
1148    case Fail{_}:
1149      close.failed(file, resource_limit("SST root hash exceeds the SHA-256 input limit"))
1150    case Done{root_hash}:
1151      next.body.output.index.hash(file, size, header, index_offset,
1152        next_used, total, block_count, next_number, next_decoded,
1153        last_key, entries, root_hash, index_hash, selected)

Uses (18)

Used by (1)