Renamed ListExample
This commit is contained in:
@@ -12,7 +12,7 @@ use websockets::WebSocket;
|
||||
|
||||
#[add_crdt_fields]
|
||||
#[derive(Clone, CrdtNode, Serialize, Deserialize)]
|
||||
pub(crate) struct ListExample {
|
||||
pub(crate) struct CrdtList {
|
||||
pub(crate) list: ListCrdt<Transaction>, // switch to Transaction as soon as char is working
|
||||
}
|
||||
|
||||
@@ -25,15 +25,15 @@ pub(crate) struct Transaction {
|
||||
amount: f64,
|
||||
}
|
||||
|
||||
pub(crate) fn new() -> (BaseCrdt<ListExample>, Ed25519KeyPair) {
|
||||
pub(crate) fn new() -> (BaseCrdt<CrdtList>, Ed25519KeyPair) {
|
||||
let keys = make_keypair();
|
||||
let bft_crdt = BaseCrdt::<ListExample>::new(&keys);
|
||||
let bft_crdt = BaseCrdt::<CrdtList>::new(&keys);
|
||||
(bft_crdt, keys)
|
||||
}
|
||||
|
||||
pub(crate) async fn send(
|
||||
count: u32,
|
||||
bft_crdt: &mut BaseCrdt<ListExample>,
|
||||
bft_crdt: &mut BaseCrdt<CrdtList>,
|
||||
ws: &mut WebSocket,
|
||||
keys: &Ed25519KeyPair,
|
||||
) -> Result<(), websockets::WebSocketError> {
|
||||
|
||||
Reference in New Issue
Block a user