From: Matt Corallo Date: Sat, 17 Aug 2024 21:13:08 +0000 (+0000) Subject: Remove the `std` feature implications from the `lightning` crate X-Git-Tag: v0.0.124-beta~5^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=refs%2Fheads%2F2024-08-feature-cleanup-1;p=rust-lightning Remove the `std` feature implications from the `lightning` crate Now that we don't have to have everything in our entire ecosystem use the same `std`/`no-std` feature combinations we should start by untangling our own features a bit. This takes one last step, removing the implications of the `std` feature from the `lightning` crate. --- diff --git a/lightning/Cargo.toml b/lightning/Cargo.toml index b8ebfdca2..d68b8c643 100644 --- a/lightning/Cargo.toml +++ b/lightning/Cargo.toml @@ -30,7 +30,7 @@ max_level_trace = [] unsafe_revoked_tx_signing = [] no-std = ["hashbrown", "possiblyrandom", "libm"] -std = ["lightning-invoice/std", "bech32/std"] +std = [] # Generates low-r bitcoin signatures, which saves 1 byte in 50% of the cases grind_signatures = [] diff --git a/lightning/src/ln/bolt11_payment.rs b/lightning/src/ln/bolt11_payment.rs index 596ee49ac..b4863d4b1 100644 --- a/lightning/src/ln/bolt11_payment.rs +++ b/lightning/src/ln/bolt11_payment.rs @@ -188,11 +188,12 @@ mod tests { let secp_ctx = Secp256k1::new(); let node_secret = nodes[1].keys_manager.backing.get_node_secret_key(); + let time = std::time::SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap(); let invoice = InvoiceBuilder::new(Currency::Bitcoin) .description("test".into()) .payment_hash(Sha256::from_slice(&payment_hash.0).unwrap()) .payment_secret(payment_secret) - .current_timestamp() + .duration_since_epoch(time) .min_final_cltv_expiry_delta(144) .amount_milli_satoshis(50_000) .payment_metadata(payment_metadata.clone())