Moved the crdt stdin listener to into the CRDT module
This commit is contained in:
@@ -6,6 +6,7 @@ use bft_json_crdt::{
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
pub mod keys;
|
pub mod keys;
|
||||||
|
pub mod stdin;
|
||||||
pub mod websocket;
|
pub mod websocket;
|
||||||
|
|
||||||
#[add_crdt_fields]
|
#[add_crdt_fields]
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ pub mod bitcoin;
|
|||||||
pub(crate) mod cli;
|
pub(crate) mod cli;
|
||||||
pub(crate) mod init;
|
pub(crate) mod init;
|
||||||
pub mod node;
|
pub mod node;
|
||||||
pub(crate) mod stdin;
|
|
||||||
pub mod utils;
|
pub mod utils;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@@ -49,7 +48,7 @@ async fn setup(name: &String) -> SideNode {
|
|||||||
let (incoming_sender, incoming_receiver) = mpsc::channel::<SignedOp>(32);
|
let (incoming_sender, incoming_receiver) = mpsc::channel::<SignedOp>(32);
|
||||||
let (stdin_sender, stdin_receiver) = std::sync::mpsc::channel();
|
let (stdin_sender, stdin_receiver) = std::sync::mpsc::channel();
|
||||||
task::spawn(async move {
|
task::spawn(async move {
|
||||||
stdin::input(stdin_sender);
|
bft_crdt::stdin::input(stdin_sender);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Finally, create the node and return it
|
// Finally, create the node and return it
|
||||||
|
|||||||
Reference in New Issue
Block a user