Noting incoming messages in simpler format
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user