2017-05-22 13:24:59 +02:00
|
|
|
#ifndef LIGHTNING_LIGHTNINGD_PEER_STATE_H
|
|
|
|
#define LIGHTNING_LIGHTNINGD_PEER_STATE_H
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
enum peer_state {
|
2017-05-22 13:27:20 +02:00
|
|
|
UNINITIALIZED,
|
|
|
|
|
|
|
|
/* In gossip daemon. */
|
|
|
|
GOSSIPD,
|
|
|
|
|
|
|
|
/* Negotiating channel opening: in opening daemon */
|
|
|
|
OPENINGD,
|
|
|
|
|
|
|
|
/* In channeld, still waiting for lockin. */
|
|
|
|
CHANNELD_AWAITING_LOCKIN,
|
2017-05-22 13:24:59 +02:00
|
|
|
|
|
|
|
/* Normal operating state. */
|
2017-05-22 13:27:20 +02:00
|
|
|
CHANNELD_NORMAL,
|
2017-05-22 13:24:59 +02:00
|
|
|
|
|
|
|
/* We are closing, pending HTLC resolution. */
|
2017-06-26 03:16:43 +02:00
|
|
|
CHANNELD_SHUTTING_DOWN,
|
2017-05-22 13:24:59 +02:00
|
|
|
|
|
|
|
/* Exchanging signatures on closing tx. */
|
2017-05-22 13:27:20 +02:00
|
|
|
CLOSINGD_SIGEXCHANGE,
|
2017-05-22 13:24:59 +02:00
|
|
|
|
2017-07-05 07:33:40 +02:00
|
|
|
/* Waiting for onchain event. */
|
|
|
|
CLOSINGD_COMPLETE,
|
|
|
|
|
2017-05-22 13:24:59 +02:00
|
|
|
/* Various onchain states. */
|
2017-05-22 13:27:20 +02:00
|
|
|
ONCHAIND_CHEATED,
|
|
|
|
ONCHAIND_THEIR_UNILATERAL,
|
|
|
|
ONCHAIND_OUR_UNILATERAL,
|
|
|
|
ONCHAIND_MUTUAL
|
2017-05-22 13:24:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_PEER_STATE_H */
|