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

Function channel_internal_error

lightningd/channel.c:1231–1258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1229}
1230
1231void channel_internal_error(struct channel *channel, const char *fmt, ...)
1232{
1233 va_list ap;
1234 char *why;
1235
1236 va_start(ap, fmt);
1237 why = tal_vfmt(tmpctx, fmt, ap);
1238 va_end(ap);
1239
1240 log_broken(channel->log, "Internal error %s: %s",
1241 channel_state_name(channel), why);
1242
1243 channel_cleanup_commands(channel, why);
1244
1245 /* Nothing ventured, nothing lost! */
1246 if (channel_state_uncommitted(channel->state)) {
1247 channel_set_owner(channel, NULL);
1248 delete_channel(channel, false);
1249 return;
1250 }
1251
1252 /* Don't expose internal error causes to remove unless doing dev */
1253 if (channel->peer->ld->developer)
1254 channel_fail_permanent(channel,
1255 REASON_LOCAL, "Internal error: %s", why);
1256 else
1257 channel_fail_permanent(channel, REASON_LOCAL, "Internal error");
1258}
1259
1260void channel_set_billboard(struct channel *channel, bool perm, const char *str)
1261{

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