Skip to content

Commit 1d3039c

Browse files
committed
fix(cch): update Lightning invoice creation to match minimum final CLTV expiry delta
1 parent efec4b9 commit 1d3039c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/fiber-lib/src/cch/tests/actor_tests.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,10 @@ async fn test_receive_btc_happy_path() {
555555
// Use a small final TLC expiry delta (10,000 ms = 10 seconds) so it fits
556556
// within the default incoming budget (180 blocks * 600 / 2 = 54,000 seconds).
557557
let fiber_invoice = create_test_fiber_invoice_with_expiry(payment_hash, 10_000);
558-
let lightning_invoice = create_test_lightning_invoice_with_payment_hash(payment_hash);
558+
// The incoming Lightning invoice must carry min_final_cltv_expiry_delta matching
559+
// the default btc_final_tlc_expiry_delta_blocks (180) so the stored invoice
560+
// reflects a realistic inbound HTLC budget.
561+
let lightning_invoice = create_test_lightning_invoice_with_cltv(payment_hash, 180);
559562
let order = CchOrder {
560563
created_at: SystemTime::now()
561564
.duration_since(UNIX_EPOCH)

0 commit comments

Comments
 (0)