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.
This commit is contained in:
Matt Corallo 2024-08-17 21:13:08 +00:00
parent 3fe4ef9640
commit 8049f99ebc
2 changed files with 3 additions and 2 deletions

View file

@ -30,7 +30,7 @@ max_level_trace = []
unsafe_revoked_tx_signing = [] unsafe_revoked_tx_signing = []
no-std = ["hashbrown", "possiblyrandom", "libm"] 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 # Generates low-r bitcoin signatures, which saves 1 byte in 50% of the cases
grind_signatures = [] grind_signatures = []

View file

@ -188,11 +188,12 @@ mod tests {
let secp_ctx = Secp256k1::new(); let secp_ctx = Secp256k1::new();
let node_secret = nodes[1].keys_manager.backing.get_node_secret_key(); 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) let invoice = InvoiceBuilder::new(Currency::Bitcoin)
.description("test".into()) .description("test".into())
.payment_hash(Sha256::from_slice(&payment_hash.0).unwrap()) .payment_hash(Sha256::from_slice(&payment_hash.0).unwrap())
.payment_secret(payment_secret) .payment_secret(payment_secret)
.current_timestamp() .duration_since_epoch(time)
.min_final_cltv_expiry_delta(144) .min_final_cltv_expiry_delta(144)
.amount_milli_satoshis(50_000) .amount_milli_satoshis(50_000)
.payment_metadata(payment_metadata.clone()) .payment_metadata(payment_metadata.clone())