mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-18 12:34:21 +01:00
common: make sphinx code ignorant of payload format.
Now "raw_payload" is always the complete string (including realm or length bytes at the front). This has several effects: 1. We can receive an decrypt an onion which is grossly malformed. 2. We can still hand this to the htlc_accepted hook. 3. We then fail it unless the htlc_accepted accepts it manually. 4. The createonion API now takes the raw payload, and does not know anything about "style". The only caveat is that the sphinx code needs to know the payload length: we have a call for that, which simply tells it to copy the entire onion (and treat us as the final node) if it's invalid. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
bb538a1862
commit
f7ebbb2ec5
@@ -20,6 +20,7 @@ DEVTOOLS_COMMON_OBJS := \
|
||||
common/hash_u5.o \
|
||||
common/memleak.o \
|
||||
common/node_id.o \
|
||||
common/onion.o \
|
||||
common/per_peer_state.o \
|
||||
common/pseudorand.o \
|
||||
common/json.o \
|
||||
|
||||
Reference in New Issue
Block a user