Skip to content

Commit

Permalink
wip debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguida committed Sep 26, 2024
1 parent c5a0022 commit e9a9cd7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
25 changes: 12 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"

[dependencies]
anyhow = "1.0"
# async-std = { version = "1", features = ["attributes", "tokio1"] }
base64 = "0.21.2"
# bdk = "0.27.1"
# bdk = { version = "0.29", default-features=false, features = ["std", "key-value-db","async-interface", "use-esplora-async", "rpc"] }
Expand All @@ -26,8 +27,8 @@ bdk_file_store = { git = "https://github.com/chrisguida/bdk", rev = "cc32e69a12b
# bitcoincore-rpc = { path = "../rust-bitcoincore-rpc/client" }
bitcoincore-rpc = { git = "https://github.com/chrisguida/rust-bitcoincore-rpc", branch = "feat/scanblocks" }
clap = { version = "4.4.0", features = ["derive"] }
cln-plugin = { git = "https://github.com/elementsproject/lightning", version = "0.1.4" }
# cln-plugin = { path = "../../lightning/plugins" }
# cln-plugin = { git = "https://github.com/elementsproject/lightning", version = "0.1.6" }
cln-plugin = { path = "../lightning/plugins" }
# cln-plugin = { git = "https://github.com/chrisguida/lightning", version = "0.1.4", branch = "feat/cln-plugin-send-notifs" }
cln-rpc = "0.1.3"
home = "0.5.5"
Expand All @@ -38,3 +39,4 @@ serde_json = "1.0.72"
[dependencies.tokio]
features = ["net", "rt-multi-thread"]
version = "1"
#path = "../tokio/tokio"
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,15 @@ async fn main() -> Result<(), anyhow::Error> {
parse_command,
)
.subscribe("block_added", block_added_handler)
// .with_logging(true)
.dynamic();
let configured_plugin = if let Some(cp) = builder.configure().await? {
cp
} else {
return Ok(());
};
// log::info!("CLN_PLUGIN_LOG = {}", std::env::var("CLN_PLUGIN_LOG")?);
// log::info!("RUST_LOG = {}", std::env::var("RUST_LOG")?);
log::debug!(
"Configuration from CLN main daemon: {:?}",
configured_plugin.configuration()
Expand Down
1 change: 1 addition & 0 deletions src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ pub fn parse_network(network: &Option<String>) -> Result<Network, Error> {
}

fn parse_currency(network: &Option<String>) -> Result<String, Error> {
log::info!("parsing network {:?} to currency", network);
Ok(get_currency(parse_network(network)?))
}

Expand Down

0 comments on commit e9a9cd7

Please sign in to comment.