mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
daemon: batching of changes as per BOLT #2.
We now keep a list of commitment transaction states for "us" and "them", as well as a "struct channel_state" for staged changes. We manipulate these structures as we send out packets, receive packets, or receive acknowledgement of packets. In particular, we update the other nodes' staging_cstate as we send out our requests, and update our own staging_cstate are we receive acks. When we receive a request, we update both (as we immediately send out our ack). The RPC output is changed; rather than expose the complexity, we expose our last committed state: what would happen if we have to drop to the blockchain now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -252,6 +252,7 @@ static const struct json_command *cmdlist[] = {
|
||||
&newhtlc_command,
|
||||
&fulfillhtlc_command,
|
||||
&failhtlc_command,
|
||||
&commit_command,
|
||||
&close_command,
|
||||
/* Developer/debugging options. */
|
||||
&echo_command,
|
||||
|
||||
Reference in New Issue
Block a user