import { EventEmitter } from "node:events"; import type { GossipUDP } from "../gossip_udp.js"; import type { GossipMessage } from "../gossip.js"; /** * FaultyGossipUDP — wraps a real GossipUDP instance and selectively * drops gossip messages to/from partitioned peers. * * Partitions are bidirectional at the individual node level: * - Outbound: `send()` calls to partitioned gossip addresses are silently dropped * - Inbound: messages from partitioned senderIds are silently dropped * * For a full partition between nodeA and nodeB, both nodes must call * `partition()` (or TestCluster handles this automatically). */ export declare class FaultyGossipUDP extends EventEmitter { private readonly inner; /** Gossip addresses to block outbound sends to (e.g., "127.0.0.1:5002") */ private readonly partitionedAddresses; /** Node IDs to block inbound messages from */ private readonly partitionedNodeIds; private readonly log; constructor(inner: GossipUDP); /** * Block gossip traffic to/from a peer. * @param nodeId The peer's nodeId (blocks inbound) * @param gossipAddress The peer's gossip address "host:port" (blocks outbound) */ partition(nodeId: string, gossipAddress: string): void; /** * Restore gossip traffic to/from a peer. * @param nodeId The peer's nodeId (unblocks inbound) * @param gossipAddress The peer's gossip address "host:port" (unblocks outbound) */ heal(nodeId: string, gossipAddress: string): void; /** * Restore all gossip partitions. */ healAll(): void; start(): Promise; stop(): Promise; send(message: GossipMessage, targetAddress: string, targetPort: number): Promise; } //# sourceMappingURL=faulty_gossip.d.ts.map