core-lightning/daemon/feechange_state.h
Rusty Russell e7b003b499 daemon: handle feechange requests.
I originally overloaded struct htlc for this, as they go through the
same states, but separating them turned out to be clearer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-26 15:31:19 +09:30

24 lines
652 B
C

#ifndef LIGHTNING_DAEMON_FEECHANGE_STATE_H
#define LIGHTNING_DAEMON_FEECHANGE_STATE_H
#include "config.h"
/* Like HTLCs, but only adding; we never "remove" a feechange. */
enum feechange_state {
/* When we add a new feechange, it goes in this order. */
SENT_FEECHANGE,
SENT_FEECHANGE_COMMIT,
RCVD_FEECHANGE_REVOCATION,
RCVD_FEECHANGE_ACK_COMMIT,
SENT_FEECHANGE_ACK_REVOCATION,
/* When they add a new feechange, it goes in this order. */
RCVD_FEECHANGE,
RCVD_FEECHANGE_COMMIT,
SENT_FEECHANGE_REVOCATION,
SENT_FEECHANGE_ACK_COMMIT,
RCVD_FEECHANGE_ACK_REVOCATION,
FEECHANGE_STATE_INVALID
};
#endif /* LIGHTNING_DAEMON_FEECHANGE_STATE_H */