]> git.bitcoin.ninja Git - ldk-sample/commitdiff
Adopt rustfmt's completely braindead expected formatting
authorMatt Corallo <git@bluematt.me>
Tue, 4 May 2021 18:47:06 +0000 (18:47 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 4 May 2021 18:51:12 +0000 (18:51 +0000)
src/bitcoind_client.rs
src/main.rs

index 6d29ca06c924e188c6c8b0067abd6c1ff4ccb847..7dc67c5fdc51451689798646a5e1b270871c444d 100644 (file)
@@ -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::<BlockchainInfo>("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::<BlockchainInfo>("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<Target, AtomicU32> = HashMap::new();
                fees.insert(Target::Background, AtomicU32::new(253));
                fees.insert(Target::Normal, AtomicU32::new(2000));
index 7f4b5bf4a3b2e72b79983b26ca3124a6eaed95d5..33e5eb5733d30c151bb97adf1260709d593f1b57 100644 (file)
@@ -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;
        }