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

Function channel_update_reserve

lightningd/dual_open_control.c:1057–1071  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057void channel_update_reserve(struct channel *channel,
1058 struct channel_config *their_config,
1059 struct amount_sat funding_total)
1060{
1061 struct amount_sat reserve;
1062
1063 reserve = calculate_reserve(their_config,
1064 funding_total,
1065 channel->opener);
1066
1067 /* Depending on path, these are disjoint */
1068 their_config->channel_reserve = reserve;
1069 channel->channel_info.their_config.channel_reserve = reserve;
1070 channel->our_config.channel_reserve = reserve;
1071}
1072
1073/* Steals fields from uncommitted_channel: returns NULL if can't generate a
1074 * key for this channel (shouldn't happen!). */

Callers 2

handle_commit_receivedFunction · 0.70

Calls 1

calculate_reserveFunction · 0.85

Tested by

no test coverage detected