mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
state.h state_types.h: move into daemon/
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
fd6c3ce5a3
commit
49809785ca
2
Makefile
2
Makefile
@ -156,8 +156,6 @@ CORE_HEADERS := close_tx.h \
|
||||
permute_tx.h \
|
||||
protobuf_convert.h \
|
||||
remove_dust.h \
|
||||
state.h \
|
||||
state_types.h \
|
||||
utils.h \
|
||||
version.h
|
||||
|
||||
|
@ -90,6 +90,8 @@ DAEMON_HEADERS := \
|
||||
daemon/routing.h \
|
||||
daemon/secrets.h \
|
||||
daemon/sphinx.h \
|
||||
daemon/state.h \
|
||||
daemon/state_types.h \
|
||||
daemon/timeout.h \
|
||||
daemon/wallet.h \
|
||||
daemon/watch.h
|
||||
@ -100,8 +102,8 @@ daemon/gen_htlc_state_names.h: daemon/htlc_state.h ccan/ccan/cdump/tools/cdump-e
|
||||
daemon/gen_feechange_state_names.h: daemon/feechange_state.h ccan/ccan/cdump/tools/cdump-enumstr
|
||||
ccan/ccan/cdump/tools/cdump-enumstr daemon/feechange_state.h > $@
|
||||
|
||||
daemon/gen_state_names.h: state_types.h ccan/ccan/cdump/tools/cdump-enumstr
|
||||
ccan/ccan/cdump/tools/cdump-enumstr state_types.h > $@
|
||||
daemon/gen_state_names.h: daemon/state_types.h ccan/ccan/cdump/tools/cdump-enumstr
|
||||
ccan/ccan/cdump/tools/cdump-enumstr daemon/state_types.h > $@
|
||||
|
||||
# lightning.pb-c.h doesn't create a named enum, just a typedef. Hack it.
|
||||
daemon/gen_pkt_names.h: lightning.pb-c.h ccan/ccan/cdump/tools/cdump-enumstr
|
||||
|
@ -1,19 +1,10 @@
|
||||
#ifndef LIGHTNING_STATE_H
|
||||
#define LIGHTNING_STATE_H
|
||||
#ifndef LIGHTNING_DAEMON_STATE_H
|
||||
#define LIGHTNING_DAEMON_STATE_H
|
||||
#include "config.h"
|
||||
|
||||
#include <ccan/tal/tal.h>
|
||||
#include <state_types.h>
|
||||
#include "daemon/state_types.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
/*
|
||||
* This is the core state machine.
|
||||
*
|
||||
* Calling the state machine updates updates peer->state, and may call
|
||||
* various peer_ callbacks. It also returns the status of the current
|
||||
* command.
|
||||
*/
|
||||
|
||||
static inline bool state_is_error(enum state s)
|
||||
{
|
||||
return s >= STATE_ERR_BREAKDOWN && s <= STATE_ERR_INTERNAL;
|
@ -48,7 +48,7 @@ enum state {
|
||||
*/
|
||||
/* Bad packet from them / protocol breakdown. */
|
||||
STATE_ERR_BREAKDOWN,
|
||||
/* Their anchor didn't reach blockchain in reasonable time. */
|
||||
/* The anchor didn't reach blockchain in reasonable time. */
|
||||
STATE_ERR_ANCHOR_TIMEOUT,
|
||||
/* We saw a tx we didn't sign. */
|
||||
STATE_ERR_INFORMATION_LEAK,
|
Loading…
Reference in New Issue
Block a user