common/onion_decode: put final flag in onion_payload.

You can use rs->nextcase, but we don't always keep that around, so
keep a flag in onion_payload.

We'll use this in the "do we need to return a blinded error code"
patch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-01-12 14:22:38 +10:30
parent 885506765e
commit d5c19b23d8
3 changed files with 10 additions and 7 deletions

View File

@@ -14,6 +14,8 @@ enum onion_payload_type {
struct onion_payload {
enum onion_payload_type type;
/* Is this the final hop? */
bool final;
struct amount_msat amt_to_forward;
u32 outgoing_cltv;