mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-08 00:33:12 +00:00
chore: update interface to type as we're not implementing it
This commit is contained in:
parent
a3202b58dd
commit
4757322489
@ -1,6 +1,6 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|
||||||
import { ChannelId, ContentMessage, isContentMessage } from "./message.js";
|
import { type ChannelId, ContentMessage, isContentMessage } from "./message.js";
|
||||||
import { PersistentStorage } from "./persistent_storage.js";
|
import { PersistentStorage } from "./persistent_storage.js";
|
||||||
|
|
||||||
export const DEFAULT_MAX_LENGTH = 10_000;
|
export const DEFAULT_MAX_LENGTH = 10_000;
|
||||||
@ -48,10 +48,10 @@ export interface ILocalHistory {
|
|||||||
): number;
|
): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MemLocalHistoryOptions {
|
export type MemLocalHistoryOptions = {
|
||||||
storage?: ChannelId | PersistentStorage;
|
storage?: ChannelId | PersistentStorage;
|
||||||
maxSize?: number;
|
maxSize?: number;
|
||||||
}
|
};
|
||||||
|
|
||||||
export class MemLocalHistory implements ILocalHistory {
|
export class MemLocalHistory implements ILocalHistory {
|
||||||
private items: ContentMessage[] = [];
|
private items: ContentMessage[] = [];
|
||||||
|
|||||||
@ -23,6 +23,8 @@ import {
|
|||||||
} from "./message.js";
|
} from "./message.js";
|
||||||
import { RepairConfig, RepairManager } from "./repair/repair.js";
|
import { RepairConfig, RepairManager } from "./repair/repair.js";
|
||||||
|
|
||||||
|
export type { ILocalHistory };
|
||||||
|
|
||||||
export const DEFAULT_BLOOM_FILTER_OPTIONS = {
|
export const DEFAULT_BLOOM_FILTER_OPTIONS = {
|
||||||
capacity: 10000,
|
capacity: 10000,
|
||||||
errorRate: 0.001
|
errorRate: 0.001
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { Logger } from "@waku/utils";
|
import { Logger } from "@waku/utils";
|
||||||
|
|
||||||
import type { ILocalHistory } from "../mem_local_history.js";
|
|
||||||
import type { HistoryEntry, MessageId } from "../message.js";
|
import type { HistoryEntry, MessageId } from "../message.js";
|
||||||
import { Message } from "../message.js";
|
import { Message } from "../message.js";
|
||||||
|
import type { ILocalHistory } from "../message_channel.js";
|
||||||
|
|
||||||
import { IncomingRepairBuffer, OutgoingRepairBuffer } from "./buffers.js";
|
import { IncomingRepairBuffer, OutgoingRepairBuffer } from "./buffers.js";
|
||||||
import {
|
import {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user