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

Function channel_update_reserve

lightningd/dual_open_control.c:1199–1213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197}
1198
1199void channel_update_reserve(struct channel *channel,
1200 struct channel_config *their_config,
1201 struct amount_sat funding_total)
1202{
1203 struct amount_sat reserve;
1204
1205 reserve = calculate_reserve(their_config,
1206 funding_total,
1207 channel->opener);
1208
1209 /* Depending on path, these are disjoint */
1210 their_config->channel_reserve = reserve;
1211 channel->channel_info.their_config.channel_reserve = reserve;
1212 channel->our_config.channel_reserve = reserve;
1213}
1214
1215/* Steals fields from uncommitted_channel: returns NULL if can't generate a
1216 * key for this channel (shouldn't happen!). */

Callers 2

handle_commit_readyFunction · 0.70

Calls 1

calculate_reserveFunction · 0.85

Tested by

no test coverage detected