lightningd: instead of malformed code, keep generic error code.

This is in preparation for generating the actual error messages inside
channeld.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-11-28 15:33:04 +10:30
committed by Christian Decker
parent 70cebb8653
commit be35895847
5 changed files with 70 additions and 79 deletions

View File

@@ -32,11 +32,11 @@ struct htlc_in {
/* Shared secret for us to send any failure message. */
struct secret shared_secret;
/* If we failed HTLC, here's the message. */
const u8 *failuremsg;
/* If a local error, this is non-zero. */
enum onion_type failcode;
/* If it was malformed, here's the error. */
enum onion_type malformed;
/* Either a remote error, or local error if !(failure & BADONION). */
const u8 *failuremsg;
/* If they fulfilled, here's the preimage. */
struct preimage *preimage;
@@ -58,11 +58,11 @@ struct htlc_out {
/* Onion information */
u8 onion_routing_packet[TOTAL_PACKET_SIZE];
/* If we failed HTLC, here's the message. */
const u8 *failuremsg;
/* If a local error, this is non-zero. */
enum onion_type failcode;
/* If it was malformed, here's the error. */
enum onion_type malformed;
/* Either a remote error, or local error if !(failure & BADONION). */
const u8 *failuremsg;
/* If we fulfilled, here's the preimage. */
struct preimage *preimage;