Simulation network for in-process testing.
Routes messages between validators in the same process, allowing fast deterministic testing of consensus logic without real networking.
Simulation network for in-process testing. Routes messages between validators in the same process, allowing fast deterministic testing of consensus logic without real networking.
(create-router)Create a message router for simulation.
Routes messages between validators in-process.
Create a message router for simulation. Routes messages between validators in-process.
(create-simulation-network peer-id router)Create a simulation network for a peer.
Args: peer-id - UUID for this peer router - Shared router atom (from create-router)
Returns: SimulationNetwork instance
Create a simulation network for a peer. Args: peer-id - UUID for this peer router - Shared router atom (from create-router) Returns: SimulationNetwork instance
(deliver-message! router sender-id topic message)Deliver a message to all peers subscribed to topic.
Simulates broadcasting - delivers to all peers except sender.
Deliver a message to all peers subscribed to topic. Simulates broadcasting - delivers to all peers except sender.
(get-message-log router)Get the message log from router (for debugging/testing).
Get the message log from router (for debugging/testing).
(register-handler! router peer-id topic handler)Register a handler for a topic on a peer.
Register a handler for a topic on a peer.
(register-peer! router peer-id)Register a peer with the router.
Register a peer with the router.
(reset-router! router)Reset router state (for testing).
Reset router state (for testing).
(unregister-handler! router peer-id topic)Unregister a handler for a topic on a peer.
Unregister a handler for a topic on a peer.
(unregister-peer! router peer-id)Unregister a peer from the router.
Unregister a peer from the router.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |