diff --git a/lightningd/channel_state.h b/lightningd/channel_state.h index 262c0e55d..eead7d32d 100644 --- a/lightningd/channel_state.h +++ b/lightningd/channel_state.h @@ -31,9 +31,17 @@ enum channel_state { ONCHAIN, /* Final state after we have fully settled on-chain */ - CLOSED + CLOSED, + + /* For dual-funded channels, we start at a different state. + * We transition to 'awaiting lockin' after sigs have + * been exchanged */ + DUALOPEND_OPEN_INIT, + + /* Dual-funded channel, waiting for lock-in */ + DUALOPEND_AWAITING_LOCKIN, }; -#define CHANNEL_STATE_MAX CLOSED +#define CHANNEL_STATE_MAX DUALOPEND_AWAITING_LOCKIN enum state_change { /* Anything other than the reasons below. Should not happen. */ diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index d31b2791c..df6775297 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -1021,6 +1021,10 @@ peer_connected_hook_cb(struct peer_connected_hook_payload *payload STEALS, "Awaiting unilateral close"); goto send_error; } + case DUALOPEND_OPEN_INIT: + case DUALOPEND_AWAITING_LOCKIN: + /* FIXME: open dualopend */ + abort(); case CHANNELD_AWAITING_LOCKIN: case CHANNELD_NORMAL: