sphinx: Use the new fromwire_tlv_payload function

We wire in the code-generated function, which removes the upfront validation
and add the validation back after the `htlc_accepted` hook returns. If a
plugin wanted to handle the onion in a special way it'll not have told us to
just continue.
This commit is contained in:
Christian Decker
2019-11-18 20:10:58 +01:00
committed by Rusty Russell
parent 2519f934aa
commit d69a43780c
3 changed files with 12 additions and 10 deletions

View File

@@ -56,12 +56,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh
void fromwire_short_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
struct short_channel_id *short_channel_id UNNEEDED)
{ fprintf(stderr, "fromwire_short_channel_id called!\n"); abort(); }
/* Generated stub for fromwire_tlvs */
bool fromwire_tlvs(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
const struct tlv_record_type types[] UNNEEDED,
size_t num_types UNNEEDED,
void *record UNNEEDED)
{ fprintf(stderr, "fromwire_tlvs called!\n"); abort(); }
/* Generated stub for fromwire_tu32 */
u32 fromwire_tu32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
{ fprintf(stderr, "fromwire_tu32 called!\n"); abort(); }