Skip to content

Commit 87f4514

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

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
@@ -554,7 +554,10 @@ async fn test_receive_btc_happy_path() {
554554
// Use a small final TLC expiry delta (10,000 ms = 10 seconds) so it fits
555555
// within the default incoming budget (180 blocks * 600 / 2 = 54,000 seconds).
556556
let fiber_invoice = create_test_fiber_invoice_with_expiry(payment_hash, 10_000);
557-
let lightning_invoice = create_test_lightning_invoice_with_payment_hash(payment_hash);
557+
// The incoming Lightning invoice must carry min_final_cltv_expiry_delta matching
558+
// the default btc_final_tlc_expiry_delta_blocks (180) so the stored invoice
559+
// reflects a realistic inbound HTLC budget.
560+
let lightning_invoice = create_test_lightning_invoice_with_cltv(payment_hash, 180);
558561
let order = CchOrder {
559562
created_at: SystemTime::now()
560563
.duration_since(UNIX_EPOCH)

0 commit comments

Comments
 (0)