Liking cljdoc? Tell your friends :D

urd.consensus.networks.simulation

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.
raw docstring

create-routerclj/s

(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.
sourceraw docstring

create-simulation-networkclj/s

(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
sourceraw docstring

deliver-message!clj/s

(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.
sourceraw docstring

get-message-logclj/s

(get-message-log router)

Get the message log from router (for debugging/testing).

Get the message log from router (for debugging/testing).
sourceraw docstring

register-handler!clj/s

(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.
sourceraw docstring

register-peer!clj/s

(register-peer! router peer-id)

Register a peer with the router.

Register a peer with the router.
sourceraw docstring

reset-router!clj/s

(reset-router! router)

Reset router state (for testing).

Reset router state (for testing).
sourceraw docstring

unregister-handler!clj/s

(unregister-handler! router peer-id topic)

Unregister a handler for a topic on a peer.

Unregister a handler for a topic on a peer.
sourceraw docstring

unregister-peer!clj/s

(unregister-peer! router peer-id)

Unregister a peer from the router.

Unregister a peer from the router.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close