Skip to content

Commit

Permalink
f use constant in invoice tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed May 5, 2021
1 parent d7d8cd7 commit 6809f2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lightning-invoice/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ where
mod test {
use {Currency, Description, InvoiceDescription};
use lightning::ln::PaymentHash;
use lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY;
use lightning::ln::functional_test_utils::*;
use lightning::ln::features::InitFeatures;
use lightning::ln::msgs::ChannelMessageHandler;
Expand All @@ -107,7 +108,7 @@ mod test {
let _chan = create_announced_chan_between_nodes(&nodes, 0, 1, InitFeatures::known(), InitFeatures::known());
let invoice = ::utils::create_invoice_from_channelmanager(&nodes[1].node, nodes[1].keys_manager, Currency::BitcoinTestnet, Some(10_000), "test".to_string()).unwrap();
assert_eq!(invoice.amount_pico_btc(), Some(100_000));
assert_eq!(invoice.min_final_cltv_expiry(), 21);
assert_eq!(invoice.min_final_cltv_expiry(), MIN_FINAL_CLTV_EXPIRY as u64);
assert_eq!(invoice.description(), InvoiceDescription::Direct(&Description("test".to_string())));

let mut route_hints = invoice.routes().clone();
Expand Down

0 comments on commit 6809f2b

Please sign in to comment.