mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
bee795ed68
We missed it in some corner cases where we crashed/were killed between being told of the lockin and sending the channel_normal_operation message. When we were restarted, we were told both sides were locked in already, so we never updated the state. Pull the entire "tell channeld" logic into channel_control.c, and make it clear that we need to keep waching if we cant't tell channeld. I think we did get this correct in practice, since funding_announce_cb has the same test, but it's better to be clear. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
24 lines
656 B
C
24 lines
656 B
C
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_CONTROL_H
|
|
#define LIGHTNING_LIGHTNINGD_CHANNEL_CONTROL_H
|
|
#include "config.h"
|
|
#include <ccan/short_types/short_types.h>
|
|
#include <stdbool.h>
|
|
|
|
struct channel;
|
|
struct crypto_state;
|
|
struct lightningd;
|
|
|
|
bool peer_start_channeld(struct channel *channel,
|
|
const struct crypto_state *cs,
|
|
u64 gossip_index,
|
|
int peer_fd, int gossip_fd,
|
|
const u8 *funding_signed,
|
|
bool reconnected);
|
|
|
|
/* Returns true if subd told, otherwise false. */
|
|
bool channel_tell_funding_locked(struct lightningd *ld,
|
|
struct channel *channel,
|
|
const struct bitcoin_txid *txid);
|
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_CONTROL_H */
|