Experimenting with distributed nodes. Wish I had more logging!

This commit is contained in:
Dave Hrycyszyn
2024-06-06 11:49:45 +01:00
parent 5c1420534c
commit 14913b28cd
3 changed files with 24 additions and 14 deletions

View File

@@ -41,14 +41,14 @@ pub(crate) async fn send(
let transaction = generate_transaction(count, keys.public().to_string());
// next job is to keep adding to this guy
let next = bft_crdt.doc.list.ops.len();
let signed_op = bft_crdt
.doc
.list
.insert_idx(0, transaction.clone())
.insert_idx(next - 1, transaction.clone())
.sign(&keys);
println!("SignedOp being sent is: {:?}", signed_op);
// println!("SignedOp being sent is: {:?}", signed_op);
println!("Sending: {:?}", signed_op);
Ok(ws
.send_text(serde_json::to_string(&signed_op).unwrap())
.await?)