From: Matt Corallo Date: Tue, 4 May 2021 18:47:06 +0000 (+0000) Subject: Adopt rustfmt's completely braindead expected formatting X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=01b091b07c04c125713392674740ac5d3ca3fa58;p=ldk-sample Adopt rustfmt's completely braindead expected formatting --- diff --git a/src/bitcoind_client.rs b/src/bitcoind_client.rs index 6d29ca0..7dc67c5 100644 --- a/src/bitcoind_client.rs +++ b/src/bitcoind_client.rs @@ -68,9 +68,13 @@ impl BitcoindClient { let rpc_credentials = base64::encode(format!("{}:{}", rpc_user.clone(), rpc_password.clone())); let mut bitcoind_rpc_client = RpcClient::new(&rpc_credentials, http_endpoint)?; - let _dummy = bitcoind_rpc_client.call_method::("getblockchaininfo", &vec![]).await - .map_err(|_| std::io::Error::new(std::io::ErrorKind::PermissionDenied, - "Failed to make initial call to bitcoind - please check your RPC user/password and access settings"))?; + let _dummy = bitcoind_rpc_client + .call_method::("getblockchaininfo", &vec![]) + .await + .map_err(|_| { + std::io::Error::new(std::io::ErrorKind::PermissionDenied, + "Failed to make initial call to bitcoind - please check your RPC user/password and access settings") + })?; let mut fees: HashMap = HashMap::new(); fees.insert(Target::Background, AtomicU32::new(253)); fees.insert(Target::Normal, AtomicU32::new(2000)); diff --git a/src/main.rs b/src/main.rs index 7f4b5bf..33e5eb5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -292,13 +292,17 @@ async fn start_ldk() { // Check that the bitcoind we've connected to is running the network we expect let bitcoind_chain = bitcoind_client.get_blockchain_info().await.chain; - if bitcoind_chain != match args.network { - bitcoin::Network::Bitcoin => "main", - bitcoin::Network::Testnet => "test", - bitcoin::Network::Regtest => "regtest", - bitcoin::Network::Signet => "signet", - } { - println!("Chain argument ({}) didn't match bitcoind chain ({})", args.network, bitcoind_chain); + if bitcoind_chain + != match args.network { + bitcoin::Network::Bitcoin => "main", + bitcoin::Network::Testnet => "test", + bitcoin::Network::Regtest => "regtest", + bitcoin::Network::Signet => "signet", + } { + println!( + "Chain argument ({}) didn't match bitcoind chain ({})", + args.network, bitcoind_chain + ); return; }