Skip to content

Commit 49b9e76

Browse files
committed
f formatting
1 parent 571fafe commit 49b9e76

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,9 @@ async fn handle_ldk_events(
348348
let key = hex_utils::hex_str(&keys_manager.get_secure_random_bytes());
349349
// Note that if the type here changes our read code needs to change as well.
350350
let output: SpendableOutputDescriptor = output;
351-
persister.persist(&format!("{}/{}", PENDING_SPENDABLE_OUTPUT_DIR, key), &output).unwrap();
351+
persister
352+
.persist(&format!("{}/{}", PENDING_SPENDABLE_OUTPUT_DIR, key), &output)
353+
.unwrap();
352354
}
353355
}
354356
Event::ChannelPending { channel_id, counterparty_node_id, .. } => {

src/sweep.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
use std::{fs, io};
21
use std::io::{Read, Seek, SeekFrom};
32
use std::path::PathBuf;
43
use std::sync::Arc;
54
use std::time::Duration;
5+
use std::{fs, io};
66

77
use lightning::chain::chaininterface::{BroadcasterInterface, ConfirmationTarget, FeeEstimator};
88
use lightning::chain::keysinterface::{EntropySource, KeysManager, SpendableOutputDescriptor};
99
use lightning::util::logger::Logger;
10-
use lightning::util::ser::{Readable, WithoutLength};
1110
use lightning::util::persist::KVStorePersister;
11+
use lightning::util::ser::{Readable, WithoutLength};
1212

1313
use bitcoin::secp256k1::Secp256k1;
1414

15+
use crate::hex_utils;
1516
use crate::BitcoindClient;
1617
use crate::FilesystemLogger;
1718
use crate::FilesystemPersister;
18-
use crate::hex_utils;
1919

2020
/// If we have any pending claimable outputs, we should slowly sweep them to our Bitcoin Core
2121
/// wallet. We technically don't need to do this - they're ours to spend when we want and can just
@@ -26,16 +26,14 @@ use crate::hex_utils;
2626
/// an associated secret key we could simply import into Bitcoin Core's wallet, but for consistency
2727
/// we don't do that here either.
2828
pub(crate) async fn periodic_sweep(
29-
ldk_data_dir: String,
30-
keys_manager: Arc<KeysManager>,
31-
logger: Arc<FilesystemLogger>,
32-
persister: Arc<FilesystemPersister>,
33-
bitcoind_client: Arc<BitcoindClient>,
29+
ldk_data_dir: String, keys_manager: Arc<KeysManager>, logger: Arc<FilesystemLogger>,
30+
persister: Arc<FilesystemPersister>, bitcoind_client: Arc<BitcoindClient>,
3431
) {
3532
// Regularly claim outputs which are exclusively spendable by us and send them to Bitcoin Core.
3633
// Note that if you more tightly integrate your wallet with LDK you may not need to do this -
3734
// these outputs can just be treated as normal outputs during coin selection.
38-
let pending_spendables_dir = format!("{}/{}", crate::PENDING_SPENDABLE_OUTPUT_DIR, ldk_data_dir);
35+
let pending_spendables_dir =
36+
format!("{}/{}", crate::PENDING_SPENDABLE_OUTPUT_DIR, ldk_data_dir);
3937
let processing_spendables_dir = format!("{}/processing_spendable_outputs", ldk_data_dir);
4038
let spendables_dir = format!("{}/spendable_outputs", ldk_data_dir);
4139

0 commit comments

Comments
 (0)