mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-18 21:25:09 +01:00
feat: bump msrv from 1.75.0 to 1.85.0
This commit is contained in:
@@ -41,6 +41,8 @@
|
|||||||
- cdk-integration-tests: Updated integration tests to use proper temp directory management ([thesimplekid]).
|
- cdk-integration-tests: Updated integration tests to use proper temp directory management ([thesimplekid]).
|
||||||
- cdk-integration-tests: Simplified regtest shell scripts to use new binaries ([thesimplekid]).
|
- cdk-integration-tests: Simplified regtest shell scripts to use new binaries ([thesimplekid]).
|
||||||
- crates/cdk-mintd: Moved mintd library functions to separate module for better organization and testability ([thesimplekid]).
|
- crates/cdk-mintd: Moved mintd library functions to separate module for better organization and testability ([thesimplekid]).
|
||||||
|
- Updated MSRV to 1.85.0 ([thesimplekid]).
|
||||||
|
- dev: Simplified Nix flake configuration by removing specific dependency version constraints from MSRV shell hook ([thesimplekid]).
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- cashu: Fixed CurrencyUnit custom units preserving original case instead of being converted to uppercase ([thesimplekid]).
|
- cashu: Fixed CurrencyUnit custom units preserving original case instead of being converted to uppercase ([thesimplekid]).
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ bare_urls = "warn"
|
|||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.75.0"
|
rust-version = "1.85.0"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
homepage = "https://github.com/cashubtc/cdk"
|
homepage = "https://github.com/cashubtc/cdk"
|
||||||
repository = "https://github.com/cashubtc/cdk.git"
|
repository = "https://github.com/cashubtc/cdk.git"
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ mod tests {
|
|||||||
|
|
||||||
match settings.options {
|
match settings.options {
|
||||||
Some(MintMethodOptions::Bolt11 { description }) => {
|
Some(MintMethodOptions::Bolt11 { description }) => {
|
||||||
assert_eq!(description, true);
|
assert!(description);
|
||||||
}
|
}
|
||||||
_ => panic!("Expected Bolt11 options with description = true"),
|
_ => panic!("Expected Bolt11 options with description = true"),
|
||||||
}
|
}
|
||||||
@@ -363,10 +363,7 @@ mod tests {
|
|||||||
|
|
||||||
match settings.options {
|
match settings.options {
|
||||||
Some(MintMethodOptions::Bolt11 { description }) => {
|
Some(MintMethodOptions::Bolt11 { description }) => {
|
||||||
assert_eq!(
|
assert!(description, "Top-level description should take precedence");
|
||||||
description, true,
|
|
||||||
"Top-level description should take precedence"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
_ => panic!("Expected Bolt11 options with description = true"),
|
_ => panic!("Expected Bolt11 options with description = true"),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ mod tests {
|
|||||||
|
|
||||||
match settings.options {
|
match settings.options {
|
||||||
Some(MeltMethodOptions::Bolt11 { amountless }) => {
|
Some(MeltMethodOptions::Bolt11 { amountless }) => {
|
||||||
assert_eq!(amountless, true);
|
assert!(amountless);
|
||||||
}
|
}
|
||||||
_ => panic!("Expected Bolt11 options with amountless = true"),
|
_ => panic!("Expected Bolt11 options with amountless = true"),
|
||||||
}
|
}
|
||||||
@@ -437,10 +437,7 @@ mod tests {
|
|||||||
|
|
||||||
match settings.options {
|
match settings.options {
|
||||||
Some(MeltMethodOptions::Bolt11 { amountless }) => {
|
Some(MeltMethodOptions::Bolt11 { amountless }) => {
|
||||||
assert_eq!(
|
assert!(amountless, "Top-level amountless should take precedence");
|
||||||
amountless, true,
|
|
||||||
"Top-level amountless should take precedence"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
_ => panic!("Expected Bolt11 options with amountless = true"),
|
_ => panic!("Expected Bolt11 options with amountless = true"),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ mod tests {
|
|||||||
let bolt11 = Bolt11Invoice::from_str(bolt11).unwrap();
|
let bolt11 = Bolt11Invoice::from_str(bolt11).unwrap();
|
||||||
|
|
||||||
let nut10 = SpendingConditions::HTLCConditions {
|
let nut10 = SpendingConditions::HTLCConditions {
|
||||||
data: bolt11.payment_hash().clone(),
|
data: *bolt11.payment_hash(),
|
||||||
conditions: None,
|
conditions: None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -97,9 +97,8 @@ impl MintPayment for Cln {
|
|||||||
self.rpc_socket
|
self.rpc_socket
|
||||||
);
|
);
|
||||||
|
|
||||||
let last_pay_index = self.get_last_pay_index().await?.map(|idx| {
|
let last_pay_index = self.get_last_pay_index().await?.inspect(|&idx| {
|
||||||
tracing::info!("CLN: Found last payment index: {}", idx);
|
tracing::info!("CLN: Found last payment index: {}", idx);
|
||||||
idx
|
|
||||||
});
|
});
|
||||||
|
|
||||||
tracing::debug!("CLN: Connecting to CLN node...");
|
tracing::debug!("CLN: Connecting to CLN node...");
|
||||||
|
|||||||
@@ -564,9 +564,8 @@ where
|
|||||||
.bind("quote_id", quote_id.as_hyphenated().to_string())
|
.bind("quote_id", quote_id.as_hyphenated().to_string())
|
||||||
.fetch_one(&self.inner)
|
.fetch_one(&self.inner)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| {
|
.inspect_err(|err| {
|
||||||
tracing::error!("SQLite could not get mint quote amount_paid");
|
tracing::error!("SQLite could not get mint quote amount_paid: {}", err);
|
||||||
err
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let current_amount_paid = if let Some(current_amount) = current_amount {
|
let current_amount_paid = if let Some(current_amount) = current_amount {
|
||||||
@@ -593,9 +592,8 @@ where
|
|||||||
.bind("quote_id", quote_id.as_hyphenated().to_string())
|
.bind("quote_id", quote_id.as_hyphenated().to_string())
|
||||||
.execute(&self.inner)
|
.execute(&self.inner)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| {
|
.inspect_err(|err| {
|
||||||
tracing::error!("SQLite could not update mint quote amount_paid");
|
tracing::error!("SQLite could not update mint quote amount_paid: {}", err);
|
||||||
err
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
// Add payment_id to mint_quote_payments table
|
// Add payment_id to mint_quote_payments table
|
||||||
@@ -638,9 +636,8 @@ where
|
|||||||
.bind("quote_id", quote_id.as_hyphenated().to_string())
|
.bind("quote_id", quote_id.as_hyphenated().to_string())
|
||||||
.fetch_one(&self.inner)
|
.fetch_one(&self.inner)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| {
|
.inspect_err(|err| {
|
||||||
tracing::error!("SQLite could not get mint quote amount_issued");
|
tracing::error!("SQLite could not get mint quote amount_issued: {}", err);
|
||||||
err
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let current_amount_issued = if let Some(current_amount) = current_amount {
|
let current_amount_issued = if let Some(current_amount) = current_amount {
|
||||||
@@ -668,9 +665,8 @@ where
|
|||||||
.bind("quote_id", quote_id.as_hyphenated().to_string())
|
.bind("quote_id", quote_id.as_hyphenated().to_string())
|
||||||
.execute(&self.inner)
|
.execute(&self.inner)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| {
|
.inspect_err(|err| {
|
||||||
tracing::error!("SQLite could not update mint quote amount_issued");
|
tracing::error!("SQLite could not update mint quote amount_issued: {}", err);
|
||||||
err
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let current_time = unix_time();
|
let current_time = unix_time();
|
||||||
|
|||||||
@@ -46,19 +46,17 @@ pub async fn ws_main(
|
|||||||
mut on_drop: mpsc::Receiver<SubId>,
|
mut on_drop: mpsc::Receiver<SubId>,
|
||||||
wallet: Arc<Wallet>,
|
wallet: Arc<Wallet>,
|
||||||
) {
|
) {
|
||||||
let url = mint_url
|
let mut url = mint_url
|
||||||
.join_paths(&["v1", "ws"])
|
.join_paths(&["v1", "ws"])
|
||||||
.as_mut()
|
.expect("Could not join paths");
|
||||||
.map(|url| {
|
|
||||||
if url.scheme() == "https" {
|
if url.scheme() == "https" {
|
||||||
url.set_scheme("wss").expect("Could not set scheme");
|
url.set_scheme("wss").expect("Could not set scheme");
|
||||||
} else {
|
} else {
|
||||||
url.set_scheme("ws").expect("Could not set scheme");
|
url.set_scheme("ws").expect("Could not set scheme");
|
||||||
}
|
}
|
||||||
url
|
|
||||||
})
|
let url = url.to_string();
|
||||||
.expect("Could not join paths")
|
|
||||||
.to_string();
|
|
||||||
|
|
||||||
let mut active_subscriptions = HashMap::<SubId, mpsc::Sender<_>>::new();
|
let mut active_subscriptions = HashMap::<SubId, mpsc::Sender<_>>::new();
|
||||||
let mut failure_count = 0;
|
let mut failure_count = 0;
|
||||||
|
|||||||
13
flake.nix
13
flake.nix
@@ -55,7 +55,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# MSRV stable
|
# MSRV stable
|
||||||
msrv_toolchain = pkgs.rust-bin.stable."1.75.0".default.override {
|
msrv_toolchain = pkgs.rust-bin.stable."1.85.0".default.override {
|
||||||
targets = [ "wasm32-unknown-unknown" ]; # wasm
|
targets = [ "wasm32-unknown-unknown" ]; # wasm
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -139,17 +139,6 @@
|
|||||||
msrv = pkgs.mkShell ({
|
msrv = pkgs.mkShell ({
|
||||||
shellHook = "
|
shellHook = "
|
||||||
${_shellHook}
|
${_shellHook}
|
||||||
cargo update
|
|
||||||
# cargo update -p async-compression --precise 0.4.3
|
|
||||||
cargo update -p home --precise 0.5.9
|
|
||||||
cargo update -p zerofrom --precise 0.1.5
|
|
||||||
cargo update -p half --precise 2.4.1
|
|
||||||
cargo update -p base64ct --precise 1.7.3
|
|
||||||
cargo update -p url --precise 2.5.2
|
|
||||||
cargo update -p pest_derive --precise 2.8.0
|
|
||||||
cargo update -p pest_generator --precise 2.8.0
|
|
||||||
cargo update -p pest_meta --precise 2.8.0
|
|
||||||
cargo update -p pest --precise 2.8.0
|
|
||||||
";
|
";
|
||||||
buildInputs = buildInputs ++ [ msrv_toolchain ];
|
buildInputs = buildInputs ++ [ msrv_toolchain ];
|
||||||
inherit nativeBuildInputs;
|
inherit nativeBuildInputs;
|
||||||
|
|||||||
Reference in New Issue
Block a user