From e8ce68b9bfecf370ca2a09bc7d65073710e7a895 Mon Sep 17 00:00:00 2001 From: Dave Hrycyszyn Date: Wed, 5 Jun 2024 11:04:55 +0100 Subject: [PATCH] WIP --- side-node/src/websocket/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/side-node/src/websocket/mod.rs b/side-node/src/websocket/mod.rs index 54348c2..53e7e20 100644 --- a/side-node/src/websocket/mod.rs +++ b/side-node/src/websocket/mod.rs @@ -32,10 +32,11 @@ pub(crate) async fn start() -> Result<(), websockets::WebSocketError> { println!("Sending: {}", json); ws.send_text(json.clone()).await?; - // TODO: bft_crdt.apply() changes in here when we receive socket input from other nodes - let msg = ws.receive().await?; println!("Received: {:?}", msg); + // TODO: bft_crdt.apply() changes in here when we receive socket input from other nodes + bft_crdt.apply(msg); + println!("New crdt state is: {}", bft_crdt.doc.view()) } }