From 13f645c8d22d249d4c13729027f710301e9ecc17 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Fri, 20 Jun 2025 10:36:42 +0200 Subject: [PATCH] Rm electrs and related dependencies --- Cargo.toml | 1 - src/config.rs | 5 ----- src/electrumclient.rs | 14 -------------- 3 files changed, 20 deletions(-) delete mode 100644 src/electrumclient.rs diff --git a/Cargo.toml b/Cargo.toml index cda27c3..7c640ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" [dependencies] anyhow = "1.0" bitcoincore-rpc = { version = "0.18" } -electrum-client = { git = "https://github.com/cygnet3/rust-electrum-client", branch = "sp_tweaks" } env_logger = "0.9" futures-util = { version = "0.3.28", default-features = false, features = ["sink", "std"] } hex = "0.4.3" diff --git a/src/config.rs b/src/config.rs index 2988b03..496bfe3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -13,7 +13,6 @@ pub struct Config { pub ws_url: String, pub wallet_name: String, pub network: Network, - pub electrum_url: String, pub blindbit_url: String, pub zmq_url: String, pub data_dir: String, @@ -64,10 +63,6 @@ impl Config { .ok_or(Error::msg("no \"network\""))? .trim_matches('\"'), )?, - electrum_url: file_content - .remove("electrum_url") - .ok_or(Error::msg("No \"electrum_url\""))? - .to_owned(), blindbit_url: file_content .remove("blindbit_url") .ok_or(Error::msg("No \"blindbit_url\""))? diff --git a/src/electrumclient.rs b/src/electrumclient.rs deleted file mode 100644 index ddc1777..0000000 --- a/src/electrumclient.rs +++ /dev/null @@ -1,14 +0,0 @@ -use electrum_client::{Client, ConfigBuilder}; -use log::info; - -const VALIDATE_DOMAIN: bool = false; // self-signed cert, so we don't validate - -pub fn create_electrum_client(electrum_url: &str) -> anyhow::Result { - let config = ConfigBuilder::new() - .validate_domain(VALIDATE_DOMAIN) - .build(); - let electrum_client = Client::from_config(electrum_url, config)?; - info!("ssl client {}", electrum_url); - - Ok(electrum_client) -}