mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
32411de90e
Much like the database; peer contains id, address, channel contains per-channel information. Where we create a channel, we always create the peer too. For the moment, peer->log and channel->log coexist side-by-side, to reduce some of the churn. Note that this changes the API to dev-forget-channel: if we have more than one channel, we insist they specify the short-channel-id. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
38 lines
821 B
C
38 lines
821 B
C
#ifndef LIGHTNING_LIGHTNINGD_PEER_STATE_H
|
|
#define LIGHTNING_LIGHTNINGD_PEER_STATE_H
|
|
#include "config.h"
|
|
|
|
/* FIXME: rename channel_state! */
|
|
enum peer_state {
|
|
UNINITIALIZED,
|
|
|
|
/* Negotiating channel opening: in opening daemon */
|
|
OPENINGD,
|
|
|
|
/* In channeld, still waiting for lockin. */
|
|
CHANNELD_AWAITING_LOCKIN,
|
|
|
|
/* 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
|
|
};
|
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_PEER_STATE_H */
|