From d3186af4ce4ad652010096827c1d6153eac6acf4 Mon Sep 17 00:00:00 2001 From: Dave Hrycyszyn Date: Thu, 6 Jun 2024 13:17:36 +0100 Subject: [PATCH] Noting incoming messages in simpler format --- side-node/src/websocket/mod.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/side-node/src/websocket/mod.rs b/side-node/src/websocket/mod.rs index b982e84..ff8f6fc 100644 --- a/side-node/src/websocket/mod.rs +++ b/side-node/src/websocket/mod.rs @@ -26,12 +26,13 @@ pub(crate) async fn start( // deserialize the message into a Transaction struct let incoming_operation: SignedOp = serde_json::from_str(&msg).unwrap(); - println!( - "Received a new network operation from: {:?}", - general_purpose::STANDARD.encode(&incoming_operation.author()) - ); + // let hash = sha256::digest(incoming_operation.inner.hash()); + // let hash = incoming_operation.inner.hash(); + let author = general_purpose::STANDARD.encode(&incoming_operation.author()); + println!("Received from {:?}", author); + + bft_crdt.apply(incoming_operation.clone()); - bft_crdt.apply(incoming_operation); // println!("New crdt state is: {}", bft_crdt.doc.view()); count = count + 1;