| 1924 | } |
| 1925 | |
| 1926 | static 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 | |
| 1945 | static void adjust_channel_feerate_bounds(struct channel *channel, u32 feerate) |
| 1946 | { |
no test coverage detected