fixup! Close memory leak, make error exposure DEVELOPER=1 only.

This commit is contained in:
Rusty Russell 2018-02-21 14:05:15 +10:30 committed by Christian Decker
parent 9842e32e06
commit 369d3ab46e

View File

@ -305,7 +305,14 @@ void channel_internal_error(struct channel *channel, const char *fmt, ...)
log_broken(channel->log, "Peer internal error %s: %s", log_broken(channel->log, "Peer internal error %s: %s",
channel_state_name(channel), why); channel_state_name(channel), why);
/* Don't expose internal error causes to remove unless doing dev */
#if DEVELOPER
channel_fail_permanent(channel, "Internal error: %s", why); channel_fail_permanent(channel, "Internal error: %s", why);
#else
channel_fail_permanent(channel, "Internal error");
#endif
tal_free(why);
} }
void channel_fail_transient(struct channel *channel, const char *fmt, ...) void channel_fail_transient(struct channel *channel, const char *fmt, ...)