| 1055 | } |
| 1056 | |
| 1057 | void 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!). */ |
no test coverage detected