Skip to content

Commit

Permalink
chore: tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
tvolk131 committed Feb 27, 2024
1 parent 2482174 commit a4a2c39
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion devimint/src/devfed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ pub async fn dev_fed(process_mgr: &ProcessManager) -> Result<DevFed> {
// Send a coin to LDK wallet.
// bitcoind
// .send_to(
// String::from("03c964ca4d2eed93720809be7c8779ed602f80ba308e474d03bcb81b9bad807477"),
// String::from("
// 03c964ca4d2eed93720809be7c8779ed602f80ba308e474d03bcb81b9bad807477"),
// 100_000_000,
// )
// .await?;
Expand Down
3 changes: 2 additions & 1 deletion devimint/src/external.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,8 @@ pub async fn open_channel_with_ldk(
pub enum LightningNode {
Cln(Lightningd),
Lnd(Lnd),
// No need to store LDK since it runs entirely inside of gatewayd and doesn't have its own daemon.
// No need to store LDK since it runs entirely inside of gatewayd and doesn't have its own
// daemon.
Ldk,
}

Expand Down
11 changes: 6 additions & 5 deletions gateway/ln-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ use fedimint_core::core::{
LEGACY_HARDCODED_INSTANCE_ID_WALLET,
};
use fedimint_core::db::{
apply_migrations_server, Database, DatabaseTransaction, DatabaseValue, IDatabaseTransactionOpsCoreTyped,
apply_migrations_server, Database, DatabaseTransaction, DatabaseValue,
IDatabaseTransactionOpsCoreTyped,
};
use fedimint_core::fmt_utils::OptStacktrace;
use fedimint_core::module::CommonModuleInit;
Expand Down Expand Up @@ -617,15 +618,15 @@ impl Gateway {
&self,
htlc_request: &InterceptHtlcRequest,
) -> Option<FederationId> {
// If the client generated the invoice, the short channel ID of the final hop should
// correspond to the federation ID.
// If the client generated the invoice, the short channel ID of the final hop
// should correspond to the federation ID.
let scid_to_feds = self.scid_to_federation.read().await;
if let Some(federation_id) = scid_to_feds.get(&htlc_request.short_channel_id) {
return Some(federation_id.clone());
}

// If the gateway generated the invoice, the payment hash should correspond to the
// federation ID.
// If the gateway generated the invoice, the payment hash should correspond to
// the federation ID.
self.payment_hash_to_federation
.read()
.await
Expand Down
2 changes: 1 addition & 1 deletion gateway/ln-gateway/src/lightning/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub enum LightningMode {
#[arg(long = "ldk-esplora-server-url", env = "FM_LDK_ESPLORA_SERVER_URL")]
esplora_server_url: String,

/// LDK network (detaults to mainnet if not provided)
/// LDK network (defaults to mainnet if not provided)
#[arg(long = "ldk-network", env = "FM_LDK_NETWORK")]
network_or: Option<CliNetwork>,
},
Expand Down

0 comments on commit a4a2c39

Please sign in to comment.