UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

10 lines 409 B
import { encodeKey } from "@lodestar/db"; import { intToBytes } from "@lodestar/utils"; import { Bucket } from "../buckets.js"; export function storeRootIndex(db, slot, stateRoot) { return db.put(getRootIndexKey(stateRoot), intToBytes(slot, 8, "be")); } export function getRootIndexKey(root) { return encodeKey(Bucket.index_stateArchiveRootIndex, root); } //# sourceMappingURL=stateArchiveIndex.js.map