mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 06:44:24 +01:00
state: use STATE_INIT and separate inputs to decide on anchor.
This is conceptually cleaner, especially since it means we're running a command until we're set up (which prevents other commands, so no special case needed). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
#define STATE_CLOSE_SPENDOURS_BIT 32
|
||||
|
||||
enum state {
|
||||
STATE_INIT_NOANCHOR,
|
||||
STATE_INIT_WITHANCHOR,
|
||||
STATE_INIT,
|
||||
|
||||
/*
|
||||
* Opening.
|
||||
@@ -268,6 +267,8 @@ enum state_input {
|
||||
INPUT_RVALUE,
|
||||
|
||||
/* Commands */
|
||||
CMD_OPEN_WITH_ANCHOR,
|
||||
CMD_OPEN_WITHOUT_ANCHOR,
|
||||
CMD_SEND_HTLC_UPDATE,
|
||||
CMD_SEND_HTLC_FULFILL,
|
||||
CMD_SEND_HTLC_TIMEDOUT,
|
||||
|
||||
Reference in New Issue
Block a user