mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
lightningd: handle tlv-style payloads.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-changed: JSON API: `htlc_accepted` hook has `type` (currently `legacy` or `tlv`) and other fields directly inside `onion`. Changelog-deprecated: JSON API: `htlc_accepted` hook `per_hop_v0` object deprecated, as is `short_channel_id` for the final hop.
This commit is contained in:
committed by
Christian Decker
parent
b7bbccd6fa
commit
2a2259083a
@@ -537,8 +537,8 @@ def test_htlc_accepted_hook_forward_restart(node_factory, executor):
|
||||
assert re.match(r'^00006700000.000100000000000003e8000000..000000000000000000000000$', onion['payload'])
|
||||
assert len(onion['payload']) == 64
|
||||
assert len(onion['shared_secret']) == 64
|
||||
assert onion['per_hop_v0']['realm'] == "00"
|
||||
assert onion['per_hop_v0']['forward_amount'] == '1000msat'
|
||||
assert onion['type'] == 'legacy'
|
||||
assert onion['forward_amount'] == '1000msat'
|
||||
assert len(onion['next_onion']) == 2 * (1300 + 32 + 33 + 1)
|
||||
|
||||
f1.result()
|
||||
|
||||
Reference in New Issue
Block a user