1- use std:: { fs, io} ;
21use std:: io:: { Read , Seek , SeekFrom } ;
32use std:: path:: PathBuf ;
43use std:: sync:: Arc ;
54use std:: time:: Duration ;
5+ use std:: { fs, io} ;
66
77use lightning:: chain:: chaininterface:: { BroadcasterInterface , ConfirmationTarget , FeeEstimator } ;
88use lightning:: chain:: keysinterface:: { EntropySource , KeysManager , SpendableOutputDescriptor } ;
99use lightning:: util:: logger:: Logger ;
10- use lightning:: util:: ser:: { Readable , WithoutLength } ;
1110use lightning:: util:: persist:: KVStorePersister ;
11+ use lightning:: util:: ser:: { Readable , WithoutLength } ;
1212
1313use bitcoin:: secp256k1:: Secp256k1 ;
1414
15+ use crate :: hex_utils;
1516use crate :: BitcoindClient ;
1617use crate :: FilesystemLogger ;
1718use 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.
2828pub ( 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