Moved websocket out onto the root

This commit is contained in:
Dave
2025-06-12 16:32:22 -04:00
parent 0126614dd3
commit c528160d34
5 changed files with 4 additions and 5 deletions

View File

@@ -6,7 +6,6 @@ use bft_json_crdt::{
use serde::{Deserialize, Serialize};
pub mod keys;
pub mod websocket;
#[add_crdt_fields]
#[derive(Clone, CrdtNode, Serialize, Deserialize, Debug)]

View File

@@ -1,4 +1,3 @@
use bft_crdt::websocket;
use bft_crdt::TransactionList;
use bft_json_crdt::json_crdt::{BaseCrdt, SignedOp};
use cli::Commands;
@@ -11,6 +10,7 @@ pub(crate) mod init;
pub mod node;
mod stdin;
pub mod utils;
pub mod websocket;
#[tokio::main]
pub async fn run() {

View File

@@ -3,7 +3,7 @@ use bft_json_crdt::json_crdt::{BaseCrdt, SignedOp};
use fastcrypto::ed25519::Ed25519KeyPair;
use tokio::sync::mpsc;
use crate::{bft_crdt::websocket::Client, bft_crdt::TransactionList, utils};
use crate::{bft_crdt::TransactionList, utils, websocket::Client};
pub struct SideNode {
crdt: BaseCrdt<TransactionList>,

View File

@@ -2,7 +2,7 @@ use bft_json_crdt::{
json_crdt::{BaseCrdt, SignedOp},
keypair::make_keypair,
};
use crdt_node::{bft_crdt::websocket::Client, bft_crdt::TransactionList, node::SideNode, utils};
use crdt_node::{bft_crdt::TransactionList, node::SideNode, utils, websocket};
use tokio::sync::mpsc;
#[tokio::test]
@@ -42,7 +42,7 @@ async fn setup(_: &str) -> SideNode {
let (_, stdin_receiver) = std::sync::mpsc::channel();
// Finally, create the node and return it
let handle = Client::new(incoming_sender).await;
let handle = websocket::Client::new(incoming_sender).await;
let node = SideNode::new(
crdt,
bft_crdt_keys,