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

Function channel_internal_error

lightningd/channel.c:1292–1319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1290}
1291
1292void channel_internal_error(struct channel *channel, const char *fmt, ...)
1293{
1294 va_list ap;
1295 char *why;
1296
1297 va_start(ap, fmt);
1298 why = tal_vfmt(tmpctx, fmt, ap);
1299 va_end(ap);
1300
1301 log_broken(channel->log, "Internal error %s: %s",
1302 channel_state_name(channel), why);
1303
1304 channel_cleanup_commands(channel, why);
1305
1306 /* Nothing ventured, nothing lost! */
1307 if (channel_state_uncommitted(channel->state)) {
1308 channel_set_owner(channel, NULL);
1309 delete_channel(channel, false);
1310 return;
1311 }
1312
1313 /* Don't expose internal error causes to remove unless doing dev */
1314 if (channel->peer->ld->developer)
1315 channel_fail_permanent(channel,
1316 REASON_LOCAL, "Internal error: %s", why);
1317 else
1318 channel_fail_permanent(channel, REASON_LOCAL, "Internal error");
1319}
1320
1321void channel_set_billboard(struct channel *channel, bool perm, const char *str)
1322{

Callers 15

opening_depth_cbFunction · 0.70
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

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