mirror of
https://github.com/lndk-org/lndk.git
synced 2026-08-13 12:33:05 +02:00
Merge pull request #255 from orbitalturtle/fix-cargo-audit-workflow
fix: resolve CI workflow errors
This commit is contained in:
commit
833a540b27
12 changed files with 58 additions and 44 deletions
2
.github/workflows/audit.yml
vendored
2
.github/workflows/audit.yml
vendored
|
|
@ -11,5 +11,5 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- run: cargo install cargo-audit
|
||||
- run: cargo install cargo-audit --locked
|
||||
- run: cargo audit
|
||||
|
|
|
|||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -8,7 +8,7 @@ on:
|
|||
|
||||
env:
|
||||
GO_VERSION: 1.21.0
|
||||
RUST_TOOLCHAIN: 1.85.0
|
||||
RUST_TOOLCHAIN: 1.88.0
|
||||
|
||||
jobs:
|
||||
build_and_format:
|
||||
|
|
|
|||
59
Cargo.lock
generated
59
Cargo.lock
generated
|
|
@ -393,9 +393,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.10.1"
|
||||
version = "1.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
||||
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
||||
|
||||
[[package]]
|
||||
name = "bzip2"
|
||||
|
|
@ -624,9 +624,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.3.11"
|
||||
version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
|
||||
checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
|
||||
dependencies = [
|
||||
"powerfmt",
|
||||
]
|
||||
|
|
@ -1318,7 +1318,10 @@ dependencies = [
|
|||
"rand_chacha 0.9.0",
|
||||
"rand_core 0.9.3",
|
||||
"rcgen",
|
||||
"rustls-webpki 0.103.10",
|
||||
"tar",
|
||||
"tempfile",
|
||||
"time",
|
||||
"tokio",
|
||||
"tonic",
|
||||
"tonic-prost",
|
||||
|
|
@ -1532,9 +1535,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "num-conv"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
||||
checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050"
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
|
|
@ -2040,7 +2043,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
"rustls-webpki 0.103.4",
|
||||
"rustls-webpki 0.103.10",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
]
|
||||
|
|
@ -2075,9 +2078,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.103.4"
|
||||
version = "0.103.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc"
|
||||
checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
|
|
@ -2135,10 +2138,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.204"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
|
||||
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
||||
dependencies = [
|
||||
"serde_core",
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
|
|
@ -2153,10 +2157,19 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.204"
|
||||
name = "serde_core"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
|
||||
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -2290,9 +2303,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tar"
|
||||
version = "0.4.41"
|
||||
version = "0.4.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909"
|
||||
checksum = "22692a6476a21fa75fdfc11d452fda482af402c008cdbaf3476414e122040973"
|
||||
dependencies = [
|
||||
"filetime",
|
||||
"libc",
|
||||
|
|
@ -2369,30 +2382,30 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.36"
|
||||
version = "0.3.47"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
|
||||
checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"itoa",
|
||||
"num-conv",
|
||||
"powerfmt",
|
||||
"serde",
|
||||
"serde_core",
|
||||
"time-core",
|
||||
"time-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time-core"
|
||||
version = "0.1.2"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
|
||||
checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
|
||||
|
||||
[[package]]
|
||||
name = "time-macros"
|
||||
version = "0.2.18"
|
||||
version = "0.2.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
|
||||
checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
|
||||
dependencies = [
|
||||
"num-conv",
|
||||
"time-core",
|
||||
|
|
|
|||
|
|
@ -39,7 +39,10 @@ tonic-types = "0.14.2"
|
|||
tonic_lnd = { git = "https://github.com/lndk-org/tonic_lnd", rev="f89f49aadc439b37d65947cc454eecffdc8c35e0", package="lndk-tonic-lnd", features = ["lightningrpc", "routerrpc", "versionrpc"] }
|
||||
hex = "0.4.3"
|
||||
configure_me = "0.4.0"
|
||||
bytes = "1.4.0"
|
||||
bytes = "1.11.1"
|
||||
time = "0.3.47"
|
||||
rustls-webpki = "0.103.10"
|
||||
tar = "0.4.45"
|
||||
triggered = "0.1.2"
|
||||
prost = "0.14.1"
|
||||
async_fn_traits = "0.1.1"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Use the official Rust image as the base image
|
||||
FROM rust:1.85 AS builder
|
||||
FROM rust:1.88 AS builder
|
||||
|
||||
# Install protobuf compiler
|
||||
RUN apt-get update && apt-get install -y protobuf-compiler git
|
||||
|
|
|
|||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -113,11 +113,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1744684506,
|
||||
"narHash": "sha256-pDPDMT1rdkTWi8MIoZ67gT3L817R7P0Jo+PP+BrnyJI=",
|
||||
"lastModified": 1774321696,
|
||||
"narHash": "sha256-g18xMjMNla/nsF5XyQCNyWmtb2UlZpkY0XE8KinIXAA=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "47beae969336c05e892e1e4a9dbaac9593de34ab",
|
||||
"rev": "49a67e6894d4cb782842ee6faa466aa90c92812d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
let
|
||||
inherit (pkgs) lib stdenv;
|
||||
src = ../../.;
|
||||
rustToolchainFile = builtins.fromTOML (builtins.readFile ../../rust-toolchain.toml);
|
||||
rustChannel = rustToolchainFile.toolchain.channel;
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain (pkgs.rust-bin.stable.${rustChannel}.default);
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain (
|
||||
pkgs.rust-bin.fromRustupToolchainFile ../../rust-toolchain.toml
|
||||
);
|
||||
commonDeps = {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "1.85.0"
|
||||
channel = "1.88.0"
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ async fn main() {
|
|||
Commands::DecodeOffer { offer_string } => {
|
||||
println!("Decoding offer: {offer_string}.");
|
||||
match decode(offer_string) {
|
||||
Ok(offer) => println!("Decoded offer: {:?}.", offer),
|
||||
Ok(offer) => println!("Decoded offer: {offer:?}."),
|
||||
Err(e) => e.exit_gracefully(),
|
||||
}
|
||||
}
|
||||
|
|
@ -219,7 +219,7 @@ async fn main() {
|
|||
let invoice_string: Bolt12InvoiceString = invoice_string.clone().into();
|
||||
match Bolt12Invoice::try_from(invoice_string) {
|
||||
Ok(invoice) => {
|
||||
println!("Decoded invoice: {:?}.", invoice);
|
||||
println!("Decoded invoice: {invoice:?}.");
|
||||
}
|
||||
Err(e) => e.exit_gracefully(),
|
||||
}
|
||||
|
|
@ -402,7 +402,7 @@ fn read_cert_from_args(
|
|||
let pem = match (&cert_pem, &cert_path) {
|
||||
(Some(pem), _) => pem.clone(),
|
||||
(None, Some(cert_path)) => std::fs::read_to_string(cert_path)
|
||||
.map_err(|e| format!("ERROR: failed to read cert: {:?}", e))?,
|
||||
.map_err(|e| format!("ERROR: failed to read cert: {e:?}"))?,
|
||||
(None, None) => {
|
||||
// If no cert pem string is provided, we'll look for the tls certificate in the
|
||||
// default location.
|
||||
|
|
@ -411,7 +411,7 @@ fn read_cert_from_args(
|
|||
.join(DEFAULT_LNDK_DIR)
|
||||
.join(DEFAULT_DATA_DIR);
|
||||
std::fs::read_to_string(data_dir.join(TLS_CERT_FILENAME))
|
||||
.map_err(|e| format!("ERROR: failed to read cert: {:?}", e))?
|
||||
.map_err(|e| format!("ERROR: failed to read cert: {e:?}"))?
|
||||
}
|
||||
};
|
||||
let cert = Certificate::from_pem(pem);
|
||||
|
|
|
|||
|
|
@ -71,9 +71,8 @@ pub fn setup_logger(log_level: Option<String>, log_file: Option<PathBuf>) -> Res
|
|||
Err(_) => {
|
||||
// Since the logger isn't set up yet, we use a println just this once.
|
||||
println!(
|
||||
"User provided log level '{}' is invalid. Make sure it is set to either 'error',
|
||||
'warn', 'info', 'debug' or 'trace'",
|
||||
level_str
|
||||
"User provided log level '{level_str}' is invalid. Make sure it is set to either 'error',
|
||||
'warn', 'info', 'debug' or 'trace'"
|
||||
);
|
||||
return Err(());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ async fn main() -> Result<(), ()> {
|
|||
.unwrap_or_exit()
|
||||
.0;
|
||||
let data_dir = create_data_dir(&config.data_dir).map_err(|e| {
|
||||
println!("Error creating LNDK's data dir: {:?}", e);
|
||||
println!("Error creating LNDK's data dir: {e:?}");
|
||||
})?;
|
||||
let log_file = config.log_file.map(PathBuf::from).or(config
|
||||
.data_dir
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@ pub async fn validate_amount(
|
|||
if let Some(msats) = pay_amount_msats {
|
||||
if msats < bitcoin_amt {
|
||||
return Err(OfferError::InvalidAmount(format!(
|
||||
"{msats} is less than offer amount {}",
|
||||
bitcoin_amt
|
||||
"{msats} is less than offer amount {bitcoin_amt}"
|
||||
)));
|
||||
}
|
||||
msats
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue