Noting incoming messages in simpler format

This commit is contained in:
Dave Hrycyszyn
2024-06-06 13:17:36 +01:00
parent b34a8f6efc
commit d3186af4ce

View File

@@ -26,12 +26,13 @@ pub(crate) async fn start(
// deserialize the message into a Transaction struct // deserialize the message into a Transaction struct
let incoming_operation: SignedOp = serde_json::from_str(&msg).unwrap(); let incoming_operation: SignedOp = serde_json::from_str(&msg).unwrap();
println!( // let hash = sha256::digest(incoming_operation.inner.hash());
"Received a new network operation from: {:?}", // let hash = incoming_operation.inner.hash();
general_purpose::STANDARD.encode(&incoming_operation.author()) 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()); // println!("New crdt state is: {}", bft_crdt.doc.view());
count = count + 1; count = count + 1;