| 1197 | } |
| 1198 | |
| 1199 | void 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!). */ |
no test coverage detected