diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index 68681fd7d512..ffd9ff1299e7 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -1072,6 +1072,7 @@ static void payment_add_hop_onion_payload(struct payment *p, u32 cltv = p->start_block + next->delay + 1; u64 msat = next->amount.millisatoshis; /* Raw: TLV payload generation*/ struct tlv_field **fields; + struct payment *root = payment_root(p); static struct short_channel_id all_zero_scid = {.u64 = 0}; /* This is the information of the node processing this payload, while @@ -1107,8 +1108,9 @@ static void payment_add_hop_onion_payload(struct payment *p, if (payment_secret != NULL) { assert(final); - tlvstream_set_tlv_payload_data(fields, payment_secret, - msat); + tlvstream_set_tlv_payload_data( + fields, payment_secret, + root->amount.millisatoshis); /* Raw: TLV payload generation*/ } break; } diff --git a/tests/test_pay.py b/tests/test_pay.py index 698f1aff293e..57c96062a403 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -3268,7 +3268,6 @@ def test_listpay_result_with_paymod(node_factory, bitcoind): assert 'destination' in l2.rpc.listpays()['pays'][0] -@pytest.mark.xfail(strict=True) @unittest.skipIf(not DEVELOPER, "needs use_shadow") def test_mpp_waitblockheight_routehint_conflict(node_factory, bitcoind, executor): '''