import { PlumTree } from "https://deno.land/x/earthstar@v10.0.0-alpha.4/src/syncer/plum_tree.ts";
A push-lazy-push-multicast tree, or 'PlumTree'. Organises a network of interconnected peers into a spanning tree where messaging resiliency, latency, and bandwidth are optimised.
When Earthstar sync agents finish their initial reconciliation phase they are switched to a mode where they are managed by a plumtree.
Properties
A list of previously received message IDs, used to check incoming messages for duplicates.
A map of DocThumbnails to timers.
Methods
Triggered when the other peer sends a DOC message. Returns a boolean indicating whether to send a PRUNE event to the peer we got this message from.
Triggered when the other peer sends a graft, i.e. WANT message.
Triggered when the other peer sends a HAVE message
Triggered when the other peer sends a PRUNE message.