mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
daemon: move unacked queue into commit_info struct.
We're about to allow changes while we're waiting for a commit ack. This means we can't have a single "unacked changes" queue; when we receive the revocation reply, we need to apply the unacked changes known at the time we sent the commit, not any we've created since then. Note that we still only have a single staged_commit; we never have two outstanding commits, since for simplicity we will still block following update_commit pending the reply to the current one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -69,6 +69,8 @@ struct commit_info {
|
||||
int *map;
|
||||
/* Revocation preimage (if known). */
|
||||
struct sha256 *revocation_preimage;
|
||||
/* unacked changes (already applied to staging_cstate) */
|
||||
union htlc_staging *unacked_changes;
|
||||
};
|
||||
|
||||
struct peer_visible_state {
|
||||
@@ -89,8 +91,6 @@ struct peer_visible_state {
|
||||
|
||||
/* cstate to generate next commitment tx. */
|
||||
struct channel_state *staging_cstate;
|
||||
/* unacked changes (already applied to staging_cstate) */
|
||||
union htlc_staging *unacked_changes;
|
||||
};
|
||||
|
||||
struct htlc_progress {
|
||||
|
||||
Reference in New Issue
Block a user