Skip to content

Commit

Permalink
testing: create cln from btc node
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  • Loading branch information
vincenzopalazzo committed Feb 26, 2024
1 parent 46ff0e4 commit c8d6fac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions testing/src/cln.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ impl Node {
pub async fn with_params(params: &str, network: &str) -> anyhow::Result<Self> {
let btc = BtcNode::tmp(network).await?;
let btc = Arc::new(btc);

Check warning on line 85 in testing/src/cln.rs

View workflow job for this annotation

GitHub Actions / clippy

usage of an `Arc` that is not `Send` and `Sync`

warning: usage of an `Arc` that is not `Send` and `Sync` --> testing/src/cln.rs:85:19 | 85 | let btc = Arc::new(btc); | ^^^^^^^^^^^^^ | = note: `Arc<BtcNode>` is not `Send` and `Sync` as: = note: - the trait `Sync` is not implemented for `BtcNode` = help: consider using an `Rc` instead. `Arc` does not provide benefits for non `Send` and `Sync` types = note: if you intend to use `Arc` with `Send` and `Sync` traits = note: wrap the inner type with a `Mutex` or implement `Send` and `Sync` for `BtcNode` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
Self::with_btc_and_params(btc.clone(), params, network).await
}

pub async fn with_btc_and_params(
btc: Arc<BtcNode>,
params: &str,
network: &str,
) -> anyhow::Result<Self> {
let dir = tempfile::tempdir()?;

let cln_path = format!("{}/.lightning", dir.path().to_str().unwrap());
Expand Down

0 comments on commit c8d6fac

Please sign in to comment.