gui: move bitcoind to new node module

This commit is contained in:
Michael Mallan 2024-08-28 11:42:32 +01:00
parent 4536eff561
commit c5d9d007fb
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB
13 changed files with 19 additions and 18 deletions

View File

@ -35,8 +35,8 @@ use state::{
use crate::{
app::{cache::Cache, error::Error, menu::Menu, wallet::Wallet},
bitcoind::Bitcoind,
daemon::{embedded::EmbeddedDaemon, Daemon, DaemonBackend},
node::bitcoind::Bitcoind,
};
use self::state::SettingsState;

View File

@ -17,8 +17,8 @@ use liana_ui::{component::form, widget::Element};
use crate::{
app::{cache::Cache, error::Error, message::Message, state::settings::State, view},
bitcoind::{RpcAuthType, RpcAuthValues},
daemon::Daemon,
node::bitcoind::{RpcAuthType, RpcAuthValues},
};
#[derive(Debug)]

View File

@ -1,4 +1,4 @@
use crate::{app::menu::Menu, bitcoind::RpcAuthType};
use crate::{app::menu::Menu, node::bitcoind::RpcAuthType};
use liana::miniscript::bitcoin::bip32::Fingerprint;
#[derive(Debug, Clone)]

View File

@ -29,8 +29,8 @@ use crate::{
menu::Menu,
view::{hw, warning::warn},
},
bitcoind::{RpcAuthType, RpcAuthValues},
hw::HardwareWallet,
node::bitcoind::{RpcAuthType, RpcAuthValues},
};
pub fn list(cache: &Cache, is_remote_backend: bool) -> Element<Message> {

View File

@ -4,8 +4,8 @@ use std::time::Duration;
use crate::{
app::settings::KeySetting,
bitcoind::{Bitcoind, InternalBitcoindConfig},
lianalite::client::backend::{BackendClient, BackendWalletClient},
node::bitcoind::{Bitcoind, InternalBitcoindConfig},
signer::Signer,
};
use async_hwi::DeviceKind;

View File

@ -6,10 +6,10 @@ use std::path::PathBuf;
use super::{context, Error};
use crate::{
bitcoind::{Bitcoind, ConfigField, RpcAuthType},
download::Progress,
hw::HardwareWalletMessage,
lianalite::client::{auth::AuthClient, backend::api},
node::bitcoind::{Bitcoind, ConfigField, RpcAuthType},
};
use async_hwi::{DeviceKind, Version};

View File

@ -21,9 +21,9 @@ use iced::{Command, Subscription};
use liana_ui::widget::*;
use crate::{
bitcoind::Bitcoind,
hw::HardwareWallets,
installer::{context::Context, message::Message, view},
node::bitcoind::Bitcoind,
};
pub trait Step {

View File

@ -21,12 +21,6 @@ use jsonrpc::{client::Client, simple_http::SimpleHttpTransport};
use liana_ui::{component::form, widget::*};
use crate::{
bitcoind::{
self, bitcoind_network_dir, internal_bitcoind_datadir, internal_bitcoind_directory,
Bitcoind, ConfigField, InternalBitcoindConfig, InternalBitcoindConfigError,
InternalBitcoindNetworkConfig, RpcAuth, RpcAuthType, RpcAuthValues,
StartInternalBitcoindError, VERSION,
},
download,
hw::HardwareWallets,
installer::{
@ -35,6 +29,12 @@ use crate::{
step::Step,
view, Error,
},
node::bitcoind::{
self, bitcoind_network_dir, internal_bitcoind_datadir, internal_bitcoind_directory,
Bitcoind, ConfigField, InternalBitcoindConfig, InternalBitcoindConfigError,
InternalBitcoindNetworkConfig, RpcAuth, RpcAuthType, RpcAuthValues,
StartInternalBitcoindError, VERSION,
},
};
// The approach for tracking download progress is taken from

View File

@ -32,7 +32,6 @@ use liana_ui::{
};
use crate::{
bitcoind::{ConfigField, RpcAuthType, RpcAuthValues, StartInternalBitcoindError},
hw::{is_compatible_with_tapminiscript, HardwareWallet, UnsupportedReason},
installer::{
message::{self, Message},
@ -40,6 +39,7 @@ use crate::{
step::{DownloadState, InstallState},
Error,
},
node::bitcoind::{ConfigField, RpcAuthType, RpcAuthValues, StartInternalBitcoindError},
};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@ -1430,7 +1430,7 @@ pub fn start_internal_bitcoind<'a>(
download_state: Option<&DownloadState>,
install_state: Option<&InstallState>,
) -> Element<'a, Message> {
let version = crate::bitcoind::VERSION;
let version = crate::node::bitcoind::VERSION;
let mut next_button = button::primary(None, "Next").width(Length::Fixed(200.0));
if let Some(Ok(_)) = started {
next_button = next_button.on_press(Message::Next);

View File

@ -1,5 +1,4 @@
pub mod app;
pub mod bitcoind;
pub mod daemon;
pub mod datadir;
pub mod download;
@ -9,6 +8,7 @@ pub mod launcher;
pub mod lianalite;
pub mod loader;
pub mod logger;
pub mod node;
pub mod signer;
pub mod utils;

View File

@ -29,10 +29,10 @@ use crate::{
config::Config as GUIConfig,
wallet::{Wallet, WalletError},
},
bitcoind::{
daemon::{client, embedded::EmbeddedDaemon, model::*, Daemon, DaemonError},
node::bitcoind::{
internal_bitcoind_debug_log_path, stop_bitcoind, Bitcoind, StartInternalBitcoindError,
},
daemon::{client, embedded::EmbeddedDaemon, model::*, Daemon, DaemonError},
};
const SYNCING_PROGRESS_1: &str = "Bitcoin Core is synchronising the blockchain. A full synchronisation typically take a few days, and is resource intensive. Once the initial synchronisation is done, the next ones will be much faster.";

1
gui/src/node/mod.rs Normal file
View File

@ -0,0 +1 @@
pub mod bitcoind;