Faking transactions more effectively
This commit is contained in:
@@ -2,7 +2,7 @@ use bft_crdt_derive::add_crdt_fields;
|
||||
|
||||
use bft_json_crdt::{
|
||||
json_crdt::{BaseCrdt, CrdtNode, IntoCrdtNode},
|
||||
keypair::{make_keypair, Ed25519KeyPair},
|
||||
keypair::{make_keypair, Ed25519KeyPair, KeyPair},
|
||||
list_crdt::ListCrdt,
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ pub(crate) async fn send(
|
||||
keys: &Ed25519KeyPair,
|
||||
) -> Result<(), websockets::WebSocketError> {
|
||||
// generate a placeholder transaction
|
||||
let transaction = generate_transaction(count);
|
||||
let transaction = generate_transaction(count, keys.public().to_string());
|
||||
|
||||
// next job is to keep adding to this guy
|
||||
let signed_op = bft_crdt
|
||||
@@ -54,9 +54,9 @@ pub(crate) async fn send(
|
||||
.await?)
|
||||
}
|
||||
|
||||
fn generate_transaction(count: u32) -> Value {
|
||||
fn generate_transaction(count: u32, pubkey: String) -> Value {
|
||||
json!({
|
||||
"from": "Alice",
|
||||
"from": pubkey,
|
||||
"to": "Bob",
|
||||
"amount": count
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user