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

Function peer_save_commitsig_sent

lightningd/peer_htlcs.c:2243–2260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2241}
2242
2243static bool peer_save_commitsig_sent(struct channel *channel, u64 commitnum)
2244{
2245 struct lightningd *ld = channel->peer->ld;
2246
2247 if (commitnum != channel->next_index[REMOTE]) {
2248 channel_internal_error(channel,
2249 "channel_sent_commitsig: expected commitnum %"PRIu64
2250 " got %"PRIu64" (while sending commitsig)",
2251 channel->next_index[REMOTE], commitnum);
2252 return false;
2253 }
2254
2255 channel->next_index[REMOTE]++;
2256
2257 /* FIXME: Save to database, with sig and HTLCs. */
2258 wallet_channel_save(ld->wallet, channel);
2259 return true;
2260}
2261
2262static void adjust_channel_feerate_bounds(struct channel *channel, u32 feerate)
2263{

Callers 1

peer_sending_commitsigFunction · 0.85

Calls 2

channel_internal_errorFunction · 0.70
wallet_channel_saveFunction · 0.50

Tested by

no test coverage detected