Moved websocket out onto the root
This commit is contained in:
@@ -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)]
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user