Skip to content

Commit

Permalink
chore: bump multimint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodylow committed Apr 19, 2024
1 parent ab6dcd0 commit bbc3f8f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion multimint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "multimint"
version = "0.3.1"
version = "0.3.2"
edition = "2021"
description = "A library for managing fedimint clients across multiple federations"
license = "MIT"
Expand Down
14 changes: 14 additions & 0 deletions multimint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ use fedimint_core::api::InviteCode;
use fedimint_core::config::{FederationId, FederationIdPrefix, JsonClientConfig};
use fedimint_core::db::Database;
use fedimint_core::Amount;
use fedimint_ln_client::LightningClientModule;
use fedimint_mint_client::MintClientModule;
use fedimint_wallet_client::WalletClientModule;
use tokio::sync::Mutex;
Expand Down Expand Up @@ -362,4 +363,17 @@ impl MultiMint {

Ok(info_map)
}

/// Update the gateway caches for all the lightning modules in the
/// multimint.
pub async fn update_gateway_caches(&self, apply_meta: bool) -> Result<()> {
let clients = self.clients.lock().await;

for (_, client) in clients.iter() {
let lightning_client = client.get_first_module::<LightningClientModule>();
lightning_client.update_gateway_cache(apply_meta).await?;
}

Ok(())
}
}

0 comments on commit bbc3f8f

Please sign in to comment.