mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
hooks: Add the raw payload to the htlc_accepted call
Since we might soon be changing the payload it is a good idea to not just expose the v0 payload, but also the raw payload for the plugin to interpret. This might also include payloads that `lightningd` itself cannot understand, but the plugin might. Signed-off-by: Christian Decker <decker.christian@gmail.com> Suggested-by: Corné Plooy <@bitonic-cjp>
This commit is contained in:
committed by
Rusty Russell
parent
1561ffaea0
commit
adb984dd45
@@ -434,6 +434,8 @@ struct route_step *process_onionpacket(
|
||||
deserialize_hop_data(&step->hop_data, paddedheader);
|
||||
|
||||
memcpy(&step->next->mac, step->hop_data.hmac, SECURITY_PARAMETER);
|
||||
step->raw_payload = tal_dup_arr(step, u8, paddedheader + 1,
|
||||
HOP_DATA_SIZE - 1 - HMAC_SIZE, 0);
|
||||
|
||||
memcpy(&step->next->routinginfo, paddedheader + HOP_DATA_SIZE, ROUTING_INFO_SIZE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user