mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 23:55:01 +01:00
Add ArcSwap to update Mint configuration at runtime (#503)
* Add ArcSwap to update Mint configuration at runtime The main goal is to change settings without having multiple RwLock everywhere, instead having ArcSwap to update the configuration without having access to a mutable reference to the Mint. This will allow the RPC Server, or any other medium to update the Mint without minimum contention. * Rename structs * Move quote_ttl to the new config * Fixed clippy issues
This commit is contained in:
@@ -34,7 +34,7 @@ mod integration_tests_pure {
|
||||
write!(
|
||||
f,
|
||||
"DirectMintConnection {{ mint_info: {:?} }}",
|
||||
self.mint.mint_info
|
||||
self.mint.config.mint_info()
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ mod integration_tests_pure {
|
||||
let connector = get_mint_connector(mint);
|
||||
|
||||
let seed = random::<[u8; 32]>();
|
||||
let mint_url = connector.mint.mint_url.to_string();
|
||||
let mint_url = connector.mint.config.mint_url().to_string();
|
||||
let unit = CurrencyUnit::Sat;
|
||||
|
||||
let localstore = WalletMemoryDatabase::default();
|
||||
|
||||
@@ -72,7 +72,7 @@ async fn mint_proofs(
|
||||
let request_lookup = uuid::Uuid::new_v4().to_string();
|
||||
|
||||
let quote = MintQuote::new(
|
||||
mint.mint_url.clone(),
|
||||
mint.config.mint_url(),
|
||||
"".to_string(),
|
||||
CurrencyUnit::Sat,
|
||||
amount,
|
||||
|
||||
Reference in New Issue
Block a user