mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
4110376e87
There's no real reason to avoid commands for the next commit; this has the benefit that we can remove the infrastructure to queue commands. The only exceptions are the commit command and the opening phase. We still only allow one commit at a time, but that's mainly run off a timer which can try again later. For the JSONRPC API used for testing, we can simply fail the commit if one is in progress. For opening we add an explicit peer_open_complete() call in place of using the command infrastructure. Commands are now outside the state machine altogether: we simply have it return the new state instead of the command status. The JSONRPC functions can also now run commands directly. This removes the idea of "peercond" as well: you can simply examine the states to determine whether an input is valid. There are fine-grained helpers for this now, too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 lines
280 B
C
11 lines
280 B
C
#ifndef LIGHTNING_NAMES_H
|
|
#define LIGHTNING_NAMES_H
|
|
#include "config.h"
|
|
#include "lightning.pb-c.h"
|
|
#include "state_types.h"
|
|
|
|
const char *state_name(enum state s);
|
|
const char *input_name(enum state_input in);
|
|
const char *pkt_name(Pkt__PktCase pkt);
|
|
#endif /* LIGHTNING_NAMES_H */
|