Updated some dependencies, got rid of Bitcoin stuff which wasn't in use

This commit is contained in:
Dave
2025-06-12 15:24:19 -04:00
parent 693ce3fafe
commit a8a5422ea8
12 changed files with 324 additions and 1455 deletions

View File

@@ -18,7 +18,7 @@ pub(crate) struct Args {
#[derive(Subcommand)]
pub(crate) enum Commands {
/// Placeholder for future BTC commands
Btc {},
// Btc {},
/// runs the Side Node
Run { name: String },

View File

@@ -2,7 +2,7 @@ use std::path::PathBuf;
use config::SideNodeConfig;
use crate::{bft_crdt, bitcoin, utils};
use crate::{bft_crdt, utils}; //bitcoin
pub(crate) mod config;
@@ -14,7 +14,7 @@ pub(crate) fn init(home: PathBuf, config: SideNodeConfig) -> Result<(), std::io:
bft_crdt::keys::write(&bft_crdt_key_path)?;
println!("Writing bitcoin key to: {:?}", bitcoin_key_path);
bitcoin::keys::write(&bitcoin_key_path)?;
// bitcoin::keys::write(&bitcoin_key_path)?;
println!("Writing config to: {:?}", config_path);
config::write_toml(&config, &config_path).expect("unable to write config file");

View File

@@ -6,7 +6,7 @@ use node::SideNode;
use tokio::{sync::mpsc, task};
pub mod bft_crdt;
pub mod bitcoin;
// pub mod bitcoin;
pub(crate) mod cli;
pub(crate) mod init;
pub mod node;
@@ -28,9 +28,9 @@ pub async fn run() {
let mut node = setup(name).await;
node.start().await;
}
Some(Commands::Btc {}) => {
let _ = bitcoin::driver::run().await;
}
// Some(Commands::Btc {}) => {
// let _ = bitcoin::driver::run().await;
// }
None => println!("No command provided. Exiting. See --help for more information."),
}
}
@@ -40,8 +40,8 @@ async fn setup(name: &String) -> SideNode {
// First, load up the keys and create a bft-bft-crdt
let side_dir = utils::home(name);
let bft_crdt_keys = bft_crdt::keys::load_from_file(&side_dir);
let keys = bitcoin::keys::load_from_file(&side_dir).unwrap();
let bitcoin_wallet = bitcoin::clients::electrum::create_wallet(keys).unwrap();
// let keys = bitcoin::keys::load_from_file(&side_dir).unwrap();
// let bitcoin_wallet = bitcoin::clients::electrum::create_wallet(keys).unwrap();
let crdt = BaseCrdt::<TransactionList>::new(&bft_crdt_keys);
// Channels for internal communication, and a tokio task for stdin input
@@ -56,7 +56,7 @@ async fn setup(name: &String) -> SideNode {
let node = SideNode::new(
crdt,
bft_crdt_keys,
bitcoin_wallet,
// bitcoin_wallet,
incoming_receiver,
stdin_receiver,
handle,

View File

@@ -1,4 +1,4 @@
use bdk::database::MemoryDatabase;
// use bdk::database::MemoryDatabase;
use bft_json_crdt::json_crdt::{BaseCrdt, SignedOp};
use fastcrypto::ed25519::Ed25519KeyPair;
use tokio::sync::mpsc;
@@ -8,7 +8,7 @@ use crate::{bft_crdt::websocket::Client, bft_crdt::TransactionList, utils};
pub struct SideNode {
crdt: BaseCrdt<TransactionList>,
bft_crdt_keys: fastcrypto::ed25519::Ed25519KeyPair,
_bitcoin_wallet: bdk::Wallet<MemoryDatabase>, // currently not read anywhere
// _bitcoin_wallet: bdk::Wallet<MemoryDatabase>, // currently not read anywhere
incoming_receiver: mpsc::Receiver<SignedOp>,
stdin_receiver: std::sync::mpsc::Receiver<String>,
handle: ezsockets::Client<Client>,
@@ -18,7 +18,7 @@ impl SideNode {
pub fn new(
crdt: BaseCrdt<TransactionList>,
bft_crdt_keys: Ed25519KeyPair,
bitcoin_wallet: bdk::Wallet<MemoryDatabase>,
// bitcoin_wallet: bdk::Wallet<MemoryDatabase>,
incoming_receiver: mpsc::Receiver<SignedOp>,
stdin_receiver: std::sync::mpsc::Receiver<String>,
handle: ezsockets::Client<Client>,
@@ -26,7 +26,7 @@ impl SideNode {
let node = Self {
crdt,
bft_crdt_keys,
_bitcoin_wallet: bitcoin_wallet,
// _bitcoin_wallet: bitcoin_wallet,
incoming_receiver,
stdin_receiver,
handle,