mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
channeld: defer construction of revocation message until master sync
This commit is contained in:
parent
d463b8d900
commit
019169fc9a
1 changed files with 5 additions and 5 deletions
|
@ -1934,11 +1934,6 @@ static void send_revocation(struct peer *peer,
|
|||
&failed,
|
||||
&added);
|
||||
|
||||
/* Revoke previous commit, get new point. */
|
||||
msg = make_revocation_msg_from_secret(peer, peer->next_index[LOCAL]-1,
|
||||
&peer->next_local_per_commit,
|
||||
old_secret, next_point);
|
||||
|
||||
/* From now on we apply changes to the next commitment */
|
||||
peer->next_index[LOCAL]++;
|
||||
|
||||
|
@ -1969,6 +1964,11 @@ static void send_revocation(struct peer *peer,
|
|||
|
||||
peer->splice_state->await_commitment_succcess = false;
|
||||
|
||||
/* Revoke previous commit, get new point. */
|
||||
msg = make_revocation_msg_from_secret(peer, peer->next_index[LOCAL]-2,
|
||||
&peer->next_local_per_commit,
|
||||
old_secret, next_point);
|
||||
|
||||
/* Now we can finally send revoke_and_ack to peer */
|
||||
peer_write(peer->pps, take(msg));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue