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

Function peer_save_commitsig_sent

lightningd/peer_htlcs.c:1926–1943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1924}
1925
1926static bool peer_save_commitsig_sent(struct channel *channel, u64 commitnum)
1927{
1928 struct lightningd *ld = channel->peer->ld;
1929
1930 if (commitnum != channel->next_index[REMOTE]) {
1931 channel_internal_error(channel,
1932 "channel_sent_commitsig: expected commitnum %"PRIu64
1933 " got %"PRIu64,
1934 channel->next_index[REMOTE], commitnum);
1935 return false;
1936 }
1937
1938 channel->next_index[REMOTE]++;
1939
1940 /* FIXME: Save to database, with sig and HTLCs. */
1941 wallet_channel_save(ld->wallet, channel);
1942 return true;
1943}
1944
1945static void adjust_channel_feerate_bounds(struct channel *channel, u32 feerate)
1946{

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