Moved all the bft_crdt stuff into its own module

This commit is contained in:
Dave Hrycyszyn
2024-06-25 13:50:02 +01:00
parent 7fb4585deb
commit e6a4fe0fd6
12 changed files with 23 additions and 23 deletions

View File

@@ -1,12 +1,12 @@
use bft_json_crdt::json_crdt::BaseCrdt;
use bft_json_crdt::keypair::make_keypair;
use bft_json_crdt::op::ROOT_ID;
use side_node::crdt::TransactionList;
use side_node::bft_crdt::TransactionList;
// case 1 - send valid updates
#[test]
fn test_valid_updates() {
// Insert to crdt.doc on local node, test applying the same operation to a remote node
// Insert to bft-crdt.doc on local node, test applying the same operation to a remote node
// and check that the view is the same
let keypair1 = make_keypair();
let mut crdt1 = BaseCrdt::<TransactionList>::new(&keypair1);

View File

@@ -3,7 +3,7 @@ use bft_json_crdt::{
keypair::make_keypair,
};
use side_node::{
bitcoin, clients::websocket::Client, crdt::TransactionList, node::SideNode, utils,
bft_crdt::TransactionList, bitcoin, clients::websocket::Client, node::SideNode, utils,
};
use tokio::sync::mpsc;
@@ -35,7 +35,7 @@ async fn test_distribute_via_websockets() {
/// Wire everything up, ignoring things we are not using in the test
async fn setup(_: &str) -> SideNode {
// First, load up the keys and create a bft-crdt
// First, load up the keys and create a bft-bft-crdt
let bft_crdt_keys = make_keypair();
let mnemonic_words = bitcoin::keys::make_mnemonic();
let keys = bitcoin::keys::get(mnemonic_words).unwrap();