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

Function channel_internal_error

lightningd/channel.c:1219–1246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1217}
1218
1219void channel_internal_error(struct channel *channel, const char *fmt, ...)
1220{
1221 va_list ap;
1222 char *why;
1223
1224 va_start(ap, fmt);
1225 why = tal_vfmt(tmpctx, fmt, ap);
1226 va_end(ap);
1227
1228 log_broken(channel->log, "Internal error %s: %s",
1229 channel_state_name(channel), why);
1230
1231 channel_cleanup_commands(channel, why);
1232
1233 /* Nothing ventured, nothing lost! */
1234 if (channel_state_uncommitted(channel->state)) {
1235 channel_set_owner(channel, NULL);
1236 delete_channel(channel, false);
1237 return;
1238 }
1239
1240 /* Don't expose internal error causes to remove unless doing dev */
1241 if (channel->peer->ld->developer)
1242 channel_fail_permanent(channel,
1243 REASON_LOCAL, "Internal error: %s", why);
1244 else
1245 channel_fail_permanent(channel, REASON_LOCAL, "Internal error");
1246}
1247
1248void channel_set_billboard(struct channel *channel, bool perm, const char *str)
1249{

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 6

channel_set_ownerFunction · 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