ByteSstFile.file.root: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile Lines 152-165 of mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend&start_line=152&end_line=165 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 # Adds the root footer after hashing header, block digest, and index metadata. def file.root( header_output: Bytes.Bytes, header_hash: Bytes.Bytes, block: Bytes.Bytes, block_root: Bytes.Bytes, index_output: Bytes.Bytes, index_hash: Bytes.Bytes, index_length: U32, +total: U32 ) -> Result<&1, &1, Error, Bytes.Bytes>: file.emit(header_output, block, index_output, Bytes.concat([footer.magic(), u32.bytes(total), u32.bytes(index_length), SHA.sha256_packed_bytes(Bytes.concat([header_hash, block_root, index_hash]))])) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=concat https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend&name=file.emit https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend&name=footer.magic https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend&name=u32.bytes https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend&name=sha256_packed_bytes