diff --git a/lightningd/htlc_set.c b/lightningd/htlc_set.c index 050255fe1..6afe60e76 100644 --- a/lightningd/htlc_set.c +++ b/lightningd/htlc_set.c @@ -182,10 +182,11 @@ void htlc_set_add(struct lightningd *ld, } log_debug(ld->log, - "HTLC set contains %zu HTLCs, for a total of %s out of %s", + "HTLC set contains %zu HTLCs, for a total of %s out of %s (%spayment_secret)", tal_count(set->htlcs), type_to_string(tmpctx, struct amount_msat, &set->so_far), - type_to_string(tmpctx, struct amount_msat, &total_msat) + type_to_string(tmpctx, struct amount_msat, &total_msat), + payment_secret ? "" : "no " ); if (amount_msat_eq(set->so_far, total_msat)) { diff --git a/tests/test_pay.py b/tests/test_pay.py index 0049c4830..9d09d7d9f 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -2440,6 +2440,7 @@ def test_pay_no_secret(node_factory, bitcoind): inv_nosecret = 'lnbcrt1u1pwue4vapp5ve584t0cv27hwmy0cx9ca8uwyqyfw9y9dm3r8vus9fv36r2l9yjsdqaw3jhxazlwpshjhmwda0hxetrwfjhgxq8pmnt9qqcqp9570xsjyykvssa6ty8fjth6f2y8h09myngad9utesttwjwclv95fz3lgd402f9e5yzpnxmkypg55rkvpg522gcz4ymsjl2w3m4jhw4jsp55m7tl' # This succeeds until we make secrets compulsory. l1.rpc.pay(inv_nosecret) + l2.daemon.wait_for_log(r'HTLC set contains 1 HTLCs, for a total of 100000msat out of 100000msat \(no payment_secret\)') @flaky @@ -2695,12 +2696,15 @@ def test_partial_payment_timeout(node_factory, bitcoind): with pytest.raises(RpcError, match=r'WIRE_MPP_TIMEOUT'): l1.rpc.waitsendpay(payment_hash=inv['payment_hash'], timeout=70 + TIMEOUT // 4, partid=1) + l2.daemon.wait_for_log(r'HTLC set contains 1 HTLCs, for a total of 500msat out of 1000msat \(payment_secret\)') # We can still pay it normally. l1.rpc.sendpay(route=route, payment_hash=inv['payment_hash'], msatoshi=1000, bolt11=inv['bolt11'], payment_secret=paysecret, partid=1) l1.rpc.sendpay(route=route, payment_hash=inv['payment_hash'], msatoshi=1000, bolt11=inv['bolt11'], payment_secret=paysecret, partid=2) l1.rpc.waitsendpay(payment_hash=inv['payment_hash'], timeout=TIMEOUT, partid=1) l1.rpc.waitsendpay(payment_hash=inv['payment_hash'], timeout=TIMEOUT, partid=2) + l2.daemon.wait_for_log(r'HTLC set contains 1 HTLCs, for a total of 500msat out of 1000msat \(payment_secret\)') + l2.daemon.wait_for_log(r'HTLC set contains 2 HTLCs, for a total of 1000msat out of 1000msat \(payment_secret\)') def test_partial_payment_restart(node_factory, bitcoind):