Skip to content

Commit 837cf23

Browse files
Fmt Botgithub-actions[bot]
authored andcommitted
2026-08-09 automated rustfmt nightly
1 parent e10861c commit 837cf23

9 files changed

Lines changed: 31 additions & 34 deletions

File tree

src/builder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use bip39::Mnemonic;
1919
use bitcoin::bip32::{ChildNumber, Xpriv};
2020
use bitcoin::secp256k1::PublicKey;
2121
use bitcoin::{BlockHash, Network};
22+
use chrono::Local;
2223
use lightning::chain::{chainmonitor, BestBlock, Watch};
2324
use lightning::io::Cursor;
2425
use lightning::ln::channelmanager::{self, ChainParameters, ChannelManagerReadArgs};
@@ -40,7 +41,6 @@ use lightning::util::persist::{
4041
SCORER_PERSISTENCE_KEY, SCORER_PERSISTENCE_PRIMARY_NAMESPACE,
4142
SCORER_PERSISTENCE_SECONDARY_NAMESPACE,
4243
};
43-
4444
use lightning::util::ser::ReadableArgs;
4545
use lightning::util::sweep::OutputSweeper;
4646
use lightning_persister::fs_store::FilesystemStore;
@@ -84,7 +84,6 @@ use crate::types::{
8484
use crate::wallet::persist::KVStoreWalletPersister;
8585
use crate::wallet::Wallet;
8686
use crate::{Node, NodeMetrics};
87-
use chrono::Local;
8887

8988
const VSS_HARDENED_CHILD_INDEX: u32 = 877;
9089
const VSS_LNURL_AUTH_HARDENED_CHILD_INDEX: u32 = 138;

src/config.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,22 @@ pub(crate) const NODE_ANN_BCAST_INTERVAL: Duration = Duration::from_secs(60 * 60
7878
pub(crate) const WALLET_SYNC_INTERVAL_MINIMUM_SECS: u64 = 10;
7979

8080
// The timeout after which we abort a wallet syncing operation.
81-
pub(crate) const BDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90; //40; //20; // Alby: larger timeouts are needed after multiple FC
81+
pub(crate) const BDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90; // 40; //20; // Alby: larger timeouts are needed after multiple FC
8282

8383
// The timeout after which we abort a wallet syncing operation.
84-
pub(crate) const LDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90; //40; //10; // Alby: larger timeouts are needed after multiple FC
84+
pub(crate) const LDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 90; // 40; //10; // Alby: larger timeouts are needed after multiple FC
8585

8686
// The timeout after which we give up waiting on LDK's event handler to exit on shutdown.
8787
pub(crate) const LDK_EVENT_HANDLER_SHUTDOWN_TIMEOUT_SECS: u64 = 60; // 30;
8888

8989
// The timeout after which we give up waiting on a background task to exit on shutdown.
90-
pub(crate) const BACKGROUND_TASK_SHUTDOWN_TIMEOUT_SECS: u64 = 20; //5;
90+
pub(crate) const BACKGROUND_TASK_SHUTDOWN_TIMEOUT_SECS: u64 = 20; // 5;
9191

9292
// The timeout after which we abort a fee rate cache update operation.
93-
pub(crate) const FEE_RATE_CACHE_UPDATE_TIMEOUT_SECS: u64 = 10; //5;
93+
pub(crate) const FEE_RATE_CACHE_UPDATE_TIMEOUT_SECS: u64 = 10; // 5;
9494

9595
// The timeout after which we abort a transaction broadcast operation.
96-
pub(crate) const TX_BROADCAST_TIMEOUT_SECS: u64 = 10; //5;
96+
pub(crate) const TX_BROADCAST_TIMEOUT_SECS: u64 = 10; // 5;
9797

9898
// The timeout after which we abort a RGS sync operation.
9999
pub(crate) const RGS_SYNC_TIMEOUT_SECS: u64 = 5;

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ where
10561056
preimage: Some(Some(payment_preimage)),
10571057
fee_paid_msat: Some(fee_paid_msat),
10581058
status: Some(PaymentStatus::Succeeded),
1059-
//fee_msat: Some(fee_paid_msat),
1059+
// fee_msat: Some(fee_paid_msat),
10601060
..PaymentDetailsUpdate::new(payment_id)
10611061
};
10621062

src/io/sqlite_store/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use std::sync::atomic::{AtomicU64, Ordering};
1616
use std::sync::{Arc, Mutex};
1717

1818
use lightning::io;
19-
2019
use lightning::util::persist::{
2120
KVStore, KVStoreSync, NETWORK_GRAPH_PERSISTENCE_KEY,
2221
NETWORK_GRAPH_PERSISTENCE_PRIMARY_NAMESPACE, NETWORK_GRAPH_PERSISTENCE_SECONDARY_NAMESPACE,

src/io/vss_store.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ impl VssStore {
112112
let key_obfuscator = KeyObfuscator::new(obfuscation_master_key);
113113

114114
let sync_retry_policy = retry_policy();
115-
/*let blocking_client = VssClient::new_with_headers(
116-
base_url.clone(),
117-
sync_retry_policy,
118-
header_provider.clone(),
119-
);*/
115+
// let blocking_client = VssClient::new_with_headers(
116+
// base_url.clone(),
117+
// sync_retry_policy,
118+
// header_provider.clone(),
119+
// );
120120
// Alby: use longer timeouts for VSS (rather than default 10 seconds)
121121
const ALBY_REQWEST_CLIENT_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(60);
122122
let client_with_custom_timeouts = reqwest::Client::builder()

src/lib.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ use std::sync::{Arc, Mutex, RwLock};
109109
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
110110

111111
pub use balance::{BalanceDetails, LightningBalance, PendingSweepBalance};
112+
pub use bip39;
113+
pub use bitcoin;
112114
use bitcoin::secp256k1::PublicKey;
113115
use bitcoin::{Address, Amount};
114116
#[cfg(feature = "uniffi")]
@@ -132,9 +134,8 @@ use ffi::*;
132134
use gossip::GossipSource;
133135
use graph::NetworkGraph;
134136
pub use io::utils::generate_entropy_mnemonic;
135-
// Alby: export LSPS2 opening fee computation for local fee estimation in Hub.
136-
pub use liquidity::lsps2_compute_opening_fee_msat;
137137
use io::utils::write_node_metrics;
138+
pub use lightning;
138139
use lightning::chain::BestBlock;
139140
use lightning::events::bump_transaction::{Input, Wallet as LdkWallet};
140141
use lightning::impl_writeable_tlv_based;
@@ -146,6 +147,11 @@ use lightning::ln::msgs::SocketAddress;
146147
use lightning::routing::gossip::NodeAlias;
147148
use lightning::util::persist::KVStoreSync;
148149
use lightning_background_processor::process_events_async;
150+
pub use lightning_invoice;
151+
pub use lightning_liquidity;
152+
pub use lightning_types;
153+
// Alby: export LSPS2 opening fee computation for local fee estimation in Hub.
154+
pub use liquidity::lsps2_compute_opening_fee_msat;
149155
use liquidity::{LSPS1Liquidity, LSPS2Liquidity, LiquiditySource};
150156
use logger::{log_debug, log_error, log_info, log_trace, LdkLogger, Logger};
151157
use payment::asynchronous::om_mailbox::OnionMessageMailbox;
@@ -155,9 +161,9 @@ use payment::{
155161
UnifiedQrPayment,
156162
};
157163
use peer_store::{PeerInfo, PeerStore};
158-
159164
use rand::Rng;
160165
use runtime::Runtime;
166+
pub use tokio;
161167
use types::{
162168
Broadcaster, BumpTransactionEventHandler, ChainMonitor, ChannelManager, Graph, KeysManager,
163169
OnionMessenger, PaymentStore, PeerManager, Router, Scorer, Sweeper, Wallet,
@@ -166,13 +172,9 @@ pub use types::{
166172
ChannelDetails, ChannelMonitorSizeInfo, CustomTlvRecord, DynStore, KeyValue, PeerDetails,
167173
SyncAndAsyncKVStore, UserChannelId, WordCount,
168174
};
169-
pub use {
170-
bip39, bitcoin, lightning, lightning_invoice, lightning_liquidity, lightning_types, tokio,
171-
vss_client,
172-
};
175+
pub use vss_client;
173176

174177
use crate::scoring::setup_background_pathfinding_scores_sync;
175-
176178
pub use crate::types::{MigrateStorage, ResetState, TlvEntry};
177179

178180
#[cfg(feature = "uniffi")]
@@ -1084,9 +1086,10 @@ impl Node {
10841086
/// we use this to be able to notify users when their channel monitors are getting too large
10851087
/// (a risk that reading/writing to VSS could start taking too long)
10861088
pub fn list_channel_monitor_sizes(&self) -> Vec<ChannelMonitorSizeInfo> {
1087-
use lightning::util::ser::Writeable;
10881089
use std::ops::Deref;
10891090

1091+
use lightning::util::ser::Writeable;
1092+
10901093
let mut channel_sizes = Vec::new();
10911094

10921095
for channel_id in self.chain_monitor.list_monitors() {

src/liquidity.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,10 +1573,8 @@ pub struct LSPS2Liquidity {
15731573

15741574
impl LSPS2Liquidity {
15751575
pub(crate) fn new(
1576-
runtime: Arc<Runtime>,
1577-
connection_manager: Arc<ConnectionManager<Arc<Logger>>>,
1578-
liquidity_source: Option<Arc<LiquiditySource<Arc<Logger>>>>,
1579-
logger: Arc<Logger>,
1576+
runtime: Arc<Runtime>, connection_manager: Arc<ConnectionManager<Arc<Logger>>>,
1577+
liquidity_source: Option<Arc<LiquiditySource<Arc<Logger>>>>, logger: Arc<Logger>,
15801578
) -> Self {
15811579
Self { runtime, connection_manager, liquidity_source, logger }
15821580
}
@@ -1606,9 +1604,8 @@ impl LSPS2Liquidity {
16061604
log_info!(self.logger, "Connected to LSPS2 LSP {}@{}. ", lsp_node_id, lsp_address);
16071605

16081606
let liquidity_source = Arc::clone(&liquidity_source);
1609-
self.runtime.block_on(async move {
1610-
liquidity_source.lsps2_request_opening_fee_params().await
1611-
})
1607+
self.runtime
1608+
.block_on(async move { liquidity_source.lsps2_request_opening_fee_params().await })
16121609
}
16131610
}
16141611

src/payment/store.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// http://opensource.org/licenses/MIT>, at your option. You may not use this file except in
66
// accordance with one or both of these licenses.
77

8-
use crate::types::TlvEntry;
9-
108
use std::time::{Duration, SystemTime, UNIX_EPOCH};
119

1210
use bitcoin::{BlockHash, Txid};
@@ -23,6 +21,7 @@ use lightning_types::string::UntrustedString;
2321

2422
use crate::data_store::{StorableObject, StorableObjectId, StorableObjectUpdate};
2523
use crate::hex_utils;
24+
use crate::types::TlvEntry;
2625

2726
/// Represents a payment.
2827
#[derive(Clone, Debug, PartialEq, Eq)]
@@ -570,7 +569,7 @@ pub(crate) struct PaymentDetailsUpdate {
570569
pub counterparty_skimmed_fee_msat: Option<Option<u64>>,
571570
pub direction: Option<PaymentDirection>,
572571
pub status: Option<PaymentStatus>,
573-
//pub fee_msat: Option<Option<u64>>, // old Alby field
572+
// pub fee_msat: Option<Option<u64>>, // old Alby field
574573
pub confirmation_status: Option<ConfirmationStatus>,
575574
}
576575

tests/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ macro_rules! expect_channel_ready_event {
100100
pub(crate) use expect_channel_ready_event;
101101

102102
macro_rules! expect_splice_pending_event {
103-
($node: expr, $counterparty_node_id: expr) => {{
103+
($node:expr, $counterparty_node_id:expr) => {{
104104
match $node.next_event_async().await {
105105
ref e @ Event::SplicePending { new_funding_txo, counterparty_node_id, .. } => {
106106
println!("{} got event {:?}", $node.node_id(), e);

0 commit comments

Comments
 (0)