core-lightning/lightningd/channel_state.h
Rusty Russell 611ecc60ae lightningd: rename peer_state -> channel_state, remove OPENINGD.
And now we can finally do the db upgrade to remove any OPENINGD
channels once, since we never put them back.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-19 02:56:51 +00:00

34 lines
818 B
C

#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_STATE_H
#define LIGHTNING_LIGHTNINGD_CHANNEL_STATE_H
#include "config.h"
/* These are in the database, so don't renumber them! */
enum channel_state {
/* In channeld, still waiting for lockin. */
CHANNELD_AWAITING_LOCKIN = 2,
/* Normal operating state. */
CHANNELD_NORMAL,
/* We are closing, pending HTLC resolution. */
CHANNELD_SHUTTING_DOWN,
/* Exchanging signatures on closing tx. */
CLOSINGD_SIGEXCHANGE,
/* Waiting for onchain event. */
CLOSINGD_COMPLETE,
/* We've seen the funding spent, we're waiting for onchaind. */
FUNDING_SPEND_SEEN,
/* Various onchain states. */
ONCHAIND_CHEATED,
ONCHAIND_THEIR_UNILATERAL,
ONCHAIND_OUR_UNILATERAL,
ONCHAIND_MUTUAL
};
#define CHANNEL_STATE_MAX ONCHAIND_MUTUAL
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_STATE_H */