Documentation
    Preparing search index...

    Interface MockHashtreeState

    In-memory state of the hashtree mock.

    createMockHashtreeService().mock.state().roots.size === 1;
    
    interface MockHashtreeState {
        counters: { fileSet: number; job: number; root: number };
        fileSets: Map<
            string,
            { fileSet: HashtreeRuntimeFileSet; windowId: string },
        >;
        jobs: Map<string, MockHashtreeJob>;
        nextPick?: HashtreeRuntimeFileSet | "cancel";
        nodes: Map<string, MockHashtreeNode>;
        pins: Map<string, HashtreePin>;
        roots: Map<string, MockHashtreeRoot>;
        timers: Map<string, () => void>;
    }
    Index

    Properties

    counters: { fileSet: number; job: number; root: number }

    Sequence counters.

    fileSets: Map<string, { fileSet: HashtreeRuntimeFileSet; windowId: string }>

    Runtime file sets keyed by id, with the owning window.

    jobs: Map<string, MockHashtreeJob>

    Jobs keyed by job id.

    nextPick?: HashtreeRuntimeFileSet | "cancel"

    Scripted outcome for the next pickFiles.

    nodes: Map<string, MockHashtreeNode>

    Every node keyed by content hash (seeded plus written).

    pins: Map<string, HashtreePin>

    Pins keyed by ref.

    roots: Map<string, MockHashtreeRoot>

    Mutable roots keyed by <pubkey>/<treeName>.

    timers: Map<string, () => void>

    Auto-advance timers keyed by job id.