From 7f88c5d2257829e651fb491181ba76f2c7e9f334 Mon Sep 17 00:00:00 2001 From: Fmt Bot Date: Sun, 11 Jan 2026 00:40:23 +0000 Subject: [PATCH] 2026-01-11 automated rustfmt nightly --- src/builder.rs | 3 +-- src/config.rs | 10 +++++----- src/event.rs | 2 +- src/io/sqlite_store/mod.rs | 1 - src/io/vss_store.rs | 10 +++++----- src/lib.rs | 5 ++--- src/payment/store.rs | 5 ++--- tests/common/mod.rs | 2 +- 8 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index 6d0d9e8ad..b35259f1c 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -19,6 +19,7 @@ use bip39::Mnemonic; use bitcoin::bip32::{ChildNumber, Xpriv}; use bitcoin::secp256k1::PublicKey; use bitcoin::{BlockHash, Network}; +use chrono::Local; use lightning::chain::{chainmonitor, BestBlock, Watch}; use lightning::io::Cursor; use lightning::ln::channelmanager::{self, ChainParameters, ChannelManagerReadArgs}; @@ -40,7 +41,6 @@ use lightning::util::persist::{ SCORER_PERSISTENCE_KEY, SCORER_PERSISTENCE_PRIMARY_NAMESPACE, SCORER_PERSISTENCE_SECONDARY_NAMESPACE, }; - use lightning::util::ser::ReadableArgs; use lightning::util::sweep::OutputSweeper; use lightning_persister::fs_store::FilesystemStore; @@ -84,7 +84,6 @@ use crate::types::{ use crate::wallet::persist::KVStoreWalletPersister; use crate::wallet::Wallet; use crate::{Node, NodeMetrics}; -use chrono::Local; const VSS_HARDENED_CHILD_INDEX: u32 = 877; const VSS_LNURL_AUTH_HARDENED_CHILD_INDEX: u32 = 138; diff --git a/src/config.rs b/src/config.rs index 5ed1d1e12..44e5f0282 100644 --- a/src/config.rs +++ b/src/config.rs @@ -75,22 +75,22 @@ pub(crate) const NODE_ANN_BCAST_INTERVAL: Duration = Duration::from_secs(60 * 60 pub(crate) const WALLET_SYNC_INTERVAL_MINIMUM_SECS: u64 = 10; // The timeout after which we abort a wallet syncing operation. -pub(crate) const BDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90; //40; //20; // Alby: larger timeouts are needed after multiple FC +pub(crate) const BDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90; // 40; //20; // Alby: larger timeouts are needed after multiple FC // The timeout after which we abort a wallet syncing operation. -pub(crate) const LDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90; //40; //10; // Alby: larger timeouts are needed after multiple FC +pub(crate) const LDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90; // 40; //10; // Alby: larger timeouts are needed after multiple FC // The timeout after which we give up waiting on LDK's event handler to exit on shutdown. pub(crate) const LDK_EVENT_HANDLER_SHUTDOWN_TIMEOUT_SECS: u64 = 60; // 30; // The timeout after which we give up waiting on a background task to exit on shutdown. -pub(crate) const BACKGROUND_TASK_SHUTDOWN_TIMEOUT_SECS: u64 = 20; //5; +pub(crate) const BACKGROUND_TASK_SHUTDOWN_TIMEOUT_SECS: u64 = 20; // 5; // The timeout after which we abort a fee rate cache update operation. -pub(crate) const FEE_RATE_CACHE_UPDATE_TIMEOUT_SECS: u64 = 10; //5; +pub(crate) const FEE_RATE_CACHE_UPDATE_TIMEOUT_SECS: u64 = 10; // 5; // The timeout after which we abort a transaction broadcast operation. -pub(crate) const TX_BROADCAST_TIMEOUT_SECS: u64 = 10; //5; +pub(crate) const TX_BROADCAST_TIMEOUT_SECS: u64 = 10; // 5; // The timeout after which we abort a RGS sync operation. pub(crate) const RGS_SYNC_TIMEOUT_SECS: u64 = 5; diff --git a/src/event.rs b/src/event.rs index d33c73d2e..5c0b943bd 100644 --- a/src/event.rs +++ b/src/event.rs @@ -1056,7 +1056,7 @@ where preimage: Some(Some(payment_preimage)), fee_paid_msat: Some(fee_paid_msat), status: Some(PaymentStatus::Succeeded), - //fee_msat: Some(fee_paid_msat), + // fee_msat: Some(fee_paid_msat), ..PaymentDetailsUpdate::new(payment_id) }; diff --git a/src/io/sqlite_store/mod.rs b/src/io/sqlite_store/mod.rs index 337211584..63a93155d 100644 --- a/src/io/sqlite_store/mod.rs +++ b/src/io/sqlite_store/mod.rs @@ -16,7 +16,6 @@ use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::{Arc, Mutex}; use lightning::io; - use lightning::util::persist::{ KVStore, KVStoreSync, NETWORK_GRAPH_PERSISTENCE_KEY, NETWORK_GRAPH_PERSISTENCE_PRIMARY_NAMESPACE, NETWORK_GRAPH_PERSISTENCE_SECONDARY_NAMESPACE, diff --git a/src/io/vss_store.rs b/src/io/vss_store.rs index 84c027787..459f04962 100644 --- a/src/io/vss_store.rs +++ b/src/io/vss_store.rs @@ -112,11 +112,11 @@ impl VssStore { let key_obfuscator = KeyObfuscator::new(obfuscation_master_key); let sync_retry_policy = retry_policy(); - /*let blocking_client = VssClient::new_with_headers( - base_url.clone(), - sync_retry_policy, - header_provider.clone(), - );*/ + // let blocking_client = VssClient::new_with_headers( + // base_url.clone(), + // sync_retry_policy, + // header_provider.clone(), + // ); // Alby: use longer timeouts for VSS (rather than default 10 seconds) const ALBY_REQWEST_CLIENT_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(60); let client_with_custom_timeouts = reqwest::Client::builder() diff --git a/src/lib.rs b/src/lib.rs index 995f1318f..010d0dccd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -153,7 +153,6 @@ use payment::{ UnifiedQrPayment, }; use peer_store::{PeerInfo, PeerStore}; - use rand::Rng; use runtime::Runtime; use types::{ @@ -170,7 +169,6 @@ pub use { }; use crate::scoring::setup_background_pathfinding_scores_sync; - use crate::types::KeyValue; pub use crate::types::{MigrateStorage, ResetState, TlvEntry}; @@ -1055,9 +1053,10 @@ impl Node { /// we use this to be able to notify users when their channel monitors are getting too large /// (a risk that reading/writing to VSS could start taking too long) pub fn list_channel_monitor_sizes(&self) -> Vec { - use lightning::util::ser::Writeable; use std::ops::Deref; + use lightning::util::ser::Writeable; + let mut channel_sizes = Vec::new(); for channel_id in self.chain_monitor.list_monitors() { diff --git a/src/payment/store.rs b/src/payment/store.rs index 8ab3d12a2..b03b2f7a5 100644 --- a/src/payment/store.rs +++ b/src/payment/store.rs @@ -5,8 +5,6 @@ // http://opensource.org/licenses/MIT>, at your option. You may not use this file except in // accordance with one or both of these licenses. -use crate::types::TlvEntry; - use std::time::{Duration, SystemTime, UNIX_EPOCH}; use bitcoin::{BlockHash, Txid}; @@ -23,6 +21,7 @@ use lightning_types::string::UntrustedString; use crate::data_store::{StorableObject, StorableObjectId, StorableObjectUpdate}; use crate::hex_utils; +use crate::types::TlvEntry; /// Represents a payment. #[derive(Clone, Debug, PartialEq, Eq)] @@ -570,7 +569,7 @@ pub(crate) struct PaymentDetailsUpdate { pub counterparty_skimmed_fee_msat: Option>, pub direction: Option, pub status: Option, - //pub fee_msat: Option>, // old Alby field + // pub fee_msat: Option>, // old Alby field pub confirmation_status: Option, } diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 4dc0b110c..a93424330 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -100,7 +100,7 @@ macro_rules! expect_channel_ready_event { pub(crate) use expect_channel_ready_event; macro_rules! expect_splice_pending_event { - ($node: expr, $counterparty_node_id: expr) => {{ + ($node:expr, $counterparty_node_id:expr) => {{ match $node.next_event_async().await { ref e @ Event::SplicePending { new_funding_txo, counterparty_node_id, .. } => { println!("{} got event {:?}", $node.node_id(), e);