You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Increase the CLTV delay required on payments and forwards
This increases the CLTV_CLAIM_BUFFER constant to 18, much better
capturing how long it takes to go on chain to claim payments.
This is also more in line with other clients, and the spec, which
sets the default CLTV delay in invoices to 18.
As a side effect, we have to increase MIN_CLTV_EXPIRY_DELTA as
otherwise as are subject to an attack where someone can hold an
HTLC being forwarded long enough that we *also* close the channel
on which we received the HTLC.
Copy file name to clipboardExpand all lines: lightning-invoice/src/utils.rs
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,7 @@ where
92
92
mod test {
93
93
use{Currency,Description,InvoiceDescription};
94
94
use lightning::ln::PaymentHash;
95
+
use lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY;
95
96
use lightning::ln::functional_test_utils::*;
96
97
use lightning::ln::features::InitFeatures;
97
98
use lightning::ln::msgs::ChannelMessageHandler;
@@ -107,7 +108,7 @@ mod test {
107
108
let _chan = create_announced_chan_between_nodes(&nodes,0,1,InitFeatures::known(),InitFeatures::known());
108
109
let invoice = ::utils::create_invoice_from_channelmanager(&nodes[1].node, nodes[1].keys_manager,Currency::BitcoinTestnet,Some(10_000),"test".to_string()).unwrap();
0 commit comments