Skip to content

Commit 5736cec

Browse files
committed
style: fixups
1 parent 82f5718 commit 5736cec

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lexe-ln/src/wallet.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
//! [`OnchainWallet::trigger_persist`]: crate::wallet::OnchainWallet::trigger_persist
3535
//! [`RootSeed`]: common::root_seed::RootSeed
3636
37-
pub mod legacy_sweep;
38-
3937
use std::{
4038
collections::{HashMap, HashSet},
4139
ops::DerefMut,
@@ -88,6 +86,9 @@ use crate::{
8886
traits::LexePersister,
8987
};
9088

89+
/// Sweeping legacy on-chain wallets to new BIP39-compatible wallets
90+
pub mod legacy_sweep;
91+
9192
/// The number of confirmations required to consider a transaction finalized.
9293
/// This determines when we'll stop syncing an internal spk (script pubkey)
9394
/// because it has no more pending spends.

lexe-ln/src/wallet/legacy_sweep.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ async fn do_legacy_sweep<CM: LexeChannelManager<PS>, PS: LexePersister>(
8787

8888
// Initialize the legacy wallet. If no changeset exists, init will
8989
// full_sync to discover any funds.
90-
let (persist_tx, mut persist_rx) = notify::channel();
90+
let (wallet_persister_tx, mut wallet_persister_rx) = notify::channel();
9191
let legacy_wallet_res = OnchainWallet::init(
9292
ctx.legacy_master_xprv,
9393
ctx.network,
9494
&ctx.esplora,
9595
ctx.fee_estimates.clone(),
9696
ctx.coin_selector,
9797
maybe_legacy_changeset,
98-
persist_tx,
98+
wallet_persister_tx,
9999
)
100100
.await
101101
.context("Failed to init legacy wallet");
@@ -114,7 +114,7 @@ async fn do_legacy_sweep<CM: LexeChannelManager<PS>, PS: LexePersister>(
114114
}
115115

116116
// See if we need to persist the legacy wallet changeset
117-
if !persist_rx.try_recv() {
117+
if !wallet_persister_rx.try_recv() {
118118
return;
119119
}
120120

@@ -176,7 +176,6 @@ async fn sync_and_sweep<CM: LexeChannelManager<PS>, PS: LexePersister>(
176176
priority,
177177
note: Some("Sweep to BIP39-compatible on-chain wallet".to_owned()),
178178
};
179-
// TODO(phlip9): add new PaymentKind? Seems a bit overkill...
180179
let oswm = OnchainSendV2::new(tx, req, PaymentKind::Onchain, fee)
181180
.context("Failed to create onchain send")?;
182181

0 commit comments

Comments
 (0)