mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-09 15:18:09 +01:00
8c22bd9ee1
For future reference, done via: for f in `find wire/ bitcoin/ common/ lightningd -name '*.h' ! -name 'gen*'`; do ID=`echo -n LIGHTNING/$f | tr 'a-z' 'A-Z' | tr -cs 'A-Z0-9' _`; sed 's/^#\(ifndef\|define\) .*_H$/#\1 '$ID/ < $f | sed 's,#endif /..*_H ./$,#endif /* '$ID' */,' | bagto $f; done Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
37 lines
881 B
C
37 lines
881 B
C
#ifndef LIGHTNING_COMMON_HTLC_STATE_H
|
|
#define LIGHTNING_COMMON_HTLC_STATE_H
|
|
#include "config.h"
|
|
|
|
enum htlc_state {
|
|
/* When we add a new htlc, it goes in this order. */
|
|
SENT_ADD_HTLC,
|
|
SENT_ADD_COMMIT,
|
|
RCVD_ADD_REVOCATION,
|
|
RCVD_ADD_ACK_COMMIT,
|
|
SENT_ADD_ACK_REVOCATION,
|
|
|
|
/* When they remove an htlc, it goes from SENT_ADD_ACK_REVOCATION: */
|
|
RCVD_REMOVE_HTLC,
|
|
RCVD_REMOVE_COMMIT,
|
|
SENT_REMOVE_REVOCATION,
|
|
SENT_REMOVE_ACK_COMMIT,
|
|
RCVD_REMOVE_ACK_REVOCATION,
|
|
|
|
/* When they add a new htlc, it goes in this order. */
|
|
RCVD_ADD_HTLC,
|
|
RCVD_ADD_COMMIT,
|
|
SENT_ADD_REVOCATION,
|
|
SENT_ADD_ACK_COMMIT,
|
|
RCVD_ADD_ACK_REVOCATION,
|
|
|
|
/* When we remove an htlc, it goes from RCVD_ADD_ACK_REVOCATION: */
|
|
SENT_REMOVE_HTLC,
|
|
SENT_REMOVE_COMMIT,
|
|
RCVD_REMOVE_REVOCATION,
|
|
RCVD_REMOVE_ACK_COMMIT,
|
|
SENT_REMOVE_ACK_REVOCATION,
|
|
|
|
HTLC_STATE_INVALID
|
|
};
|
|
#endif /* LIGHTNING_COMMON_HTLC_STATE_H */
|