mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
channeld: use wirestring for failure strings.
I think this code predated wirestring. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -364,7 +364,7 @@ static void rcvd_htlc_reply(struct subd *subd, const u8 *msg, const int *fds UNU
|
||||
struct htlc_out *hout)
|
||||
{
|
||||
u16 failure_code;
|
||||
u8 *failurestr;
|
||||
char *failurestr;
|
||||
struct lightningd *ld = subd->ld;
|
||||
|
||||
if (!fromwire_channel_offer_htlc_reply(msg, msg,
|
||||
@@ -380,10 +380,9 @@ static void rcvd_htlc_reply(struct subd *subd, const u8 *msg, const int *fds UNU
|
||||
if (failure_code) {
|
||||
hout->failcode = (enum onion_type) failure_code;
|
||||
if (hout->am_origin) {
|
||||
char *localfail = tal_fmt(msg, "%s: %.*s",
|
||||
char *localfail = tal_fmt(msg, "%s: %s",
|
||||
onion_type_name(failure_code),
|
||||
(int)tal_count(failurestr),
|
||||
(const char *)failurestr);
|
||||
failurestr);
|
||||
payment_failed(ld, hout, localfail);
|
||||
|
||||
} else if (hout->in) {
|
||||
|
||||
Reference in New Issue
Block a user