Skip to content

Commit fe79cf0

Browse files
committed
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.
1 parent a4d3381 commit fe79cf0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lightning/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ max_level_trace = []
3030
unsafe_revoked_tx_signing = []
3131

3232
no-std = ["hashbrown", "possiblyrandom", "libm"]
33-
std = ["lightning-invoice/std", "bech32/std"]
33+
std = []
3434

3535
# Generates low-r bitcoin signatures, which saves 1 byte in 50% of the cases
3636
grind_signatures = []

lightning/src/ln/bolt11_payment.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,12 @@ mod tests {
188188

189189
let secp_ctx = Secp256k1::new();
190190
let node_secret = nodes[1].keys_manager.backing.get_node_secret_key();
191+
let time = std::time::SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap();
191192
let invoice = InvoiceBuilder::new(Currency::Bitcoin)
192193
.description("test".into())
193194
.payment_hash(Sha256::from_slice(&payment_hash.0).unwrap())
194195
.payment_secret(payment_secret)
195-
.current_timestamp()
196+
.duration_since_epoch(time)
196197
.min_final_cltv_expiry_delta(144)
197198
.amount_milli_satoshis(50_000)
198199
.payment_metadata(payment_metadata.clone())

0 commit comments

Comments
 (0)