use lightning::chain::chaininterface::{BroadcasterInterface, FeeEstimator};
use lightning::chain::keysinterface::{Sign, KeysInterface};
use lightning::ln::channelmanager::{ChannelManager, MIN_FINAL_CLTV_EXPIRY};
-use lightning::ln::features::InvoiceFeatures;
use lightning::routing::network_graph::RoutingFees;
use lightning::routing::router::RouteHintHop;
use lightning::util::logger::Logger;
.payee_pub_key(our_node_pubkey)
.payment_hash(Hash::from_slice(&payment_hash.0).unwrap())
.payment_secret(payment_secret)
- .features(InvoiceFeatures::known())
+ .basic_mpp()
.min_final_cltv_expiry(MIN_FINAL_CLTV_EXPIRY.into());
if let Some(amt) = amt_msat {
invoice = invoice.amount_pico_btc(amt * 10);
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;
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(), Some(9));
+ 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();
Some(&first_hops.iter().collect::<Vec<_>>()),
&last_hops.iter().collect::<Vec<_>>(),
amt_msat,
- invoice.min_final_cltv_expiry().unwrap() as u32,
+ invoice.min_final_cltv_expiry() as u32,
&logger,
).unwrap();