MCPcopy Create free account
hub / github.com/ElementsProject/lightning / channel_internal_error

Function channel_internal_error

lightningd/channel.c:901–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

899}
900
901void channel_internal_error(struct channel *channel, const char *fmt, ...)
902{
903 va_list ap;
904 char *why;
905
906 va_start(ap, fmt);
907 why = tal_vfmt(channel, fmt, ap);
908 va_end(ap);
909
910 log_broken(channel->log, "Internal error %s: %s",
911 channel_state_name(channel), why);
912
913 channel_cleanup_commands(channel, why);
914
915 if (channel_unsaved(channel)) {
916 channel_set_owner(channel, NULL);
917 delete_channel(channel);
918 tal_free(why);
919 return;
920 }
921
922 /* Don't expose internal error causes to remove unless doing dev */
923#if DEVELOPER
924 channel_fail_permanent(channel,
925 REASON_LOCAL, "Internal error: %s", why);
926#else
927 channel_fail_permanent(channel, REASON_LOCAL, "Internal error");
928#endif
929 tal_free(why);
930}
931
932void channel_set_billboard(struct channel *channel, bool perm, const char *str)
933{

Callers 15

handle_channel_closedFunction · 0.70
handle_peer_tx_sigs_sentFunction · 0.70
handle_dry_run_finishedFunction · 0.70
handle_peer_lockedFunction · 0.70
handle_channel_lockedFunction · 0.70
rbf_got_offerFunction · 0.70
accepter_got_offerFunction · 0.70
handle_peer_tx_sigs_msgFunction · 0.70
handle_validate_leaseFunction · 0.70
handle_validate_rbfFunction · 0.70

Calls 7

channel_unsavedFunction · 0.85
channel_set_ownerFunction · 0.85
tal_freeFunction · 0.85
channel_state_nameFunction · 0.70
channel_cleanup_commandsFunction · 0.70
delete_channelFunction · 0.70
channel_fail_permanentFunction · 0.70

Tested by

no test coverage detected