mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-09 15:18:09 +01:00
866ac79850
We keep the scriptpubkey to send until after a commitment_signed (or, in the corner case, if there's no pending commitment). When we receive a shutdown from the peer, we pass it up to the master. It's up to the master not to add any more HTLCs, which works because we move from CHANNELD_NORMAL to CHANNELD_SHUTTING_DOWN. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
34 lines
680 B
C
34 lines
680 B
C
#ifndef LIGHTNING_LIGHTNINGD_PEER_STATE_H
|
|
#define LIGHTNING_LIGHTNINGD_PEER_STATE_H
|
|
#include "config.h"
|
|
|
|
enum peer_state {
|
|
UNINITIALIZED,
|
|
|
|
/* In gossip daemon. */
|
|
GOSSIPD,
|
|
|
|
/* 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,
|
|
|
|
/* Various onchain states. */
|
|
ONCHAIND_CHEATED,
|
|
ONCHAIND_THEIR_UNILATERAL,
|
|
ONCHAIND_OUR_UNILATERAL,
|
|
ONCHAIND_MUTUAL
|
|
};
|
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_PEER_STATE_H */
|