mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
peer: don't leave initial cstate around.
Attach it to the commit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
64809fb730
commit
6bda93f99a
1 changed files with 7 additions and 7 deletions
|
@ -4071,16 +4071,16 @@ bool setup_first_commit(struct peer *peer)
|
||||||
assert(!peer->remote.commit->tx);
|
assert(!peer->remote.commit->tx);
|
||||||
|
|
||||||
/* Revocation hashes already filled in, from pkt_open */
|
/* Revocation hashes already filled in, from pkt_open */
|
||||||
peer->local.commit->cstate = initial_cstate(peer,
|
peer->local.commit->cstate = initial_cstate(peer->local.commit,
|
||||||
peer->anchor.satoshis,
|
peer->anchor.satoshis,
|
||||||
peer->local.commit_fee_rate,
|
peer->local.commit_fee_rate,
|
||||||
peer->local.offer_anchor
|
peer->local.offer_anchor
|
||||||
== CMD_OPEN_WITH_ANCHOR ?
|
== CMD_OPEN_WITH_ANCHOR ?
|
||||||
LOCAL : REMOTE);
|
LOCAL : REMOTE);
|
||||||
if (!peer->local.commit->cstate)
|
if (!peer->local.commit->cstate)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
peer->remote.commit->cstate = initial_cstate(peer,
|
peer->remote.commit->cstate = initial_cstate(peer->remote.commit,
|
||||||
peer->anchor.satoshis,
|
peer->anchor.satoshis,
|
||||||
peer->remote.commit_fee_rate,
|
peer->remote.commit_fee_rate,
|
||||||
peer->local.offer_anchor
|
peer->local.offer_anchor
|
||||||
|
|
Loading…
Add table
Reference in a new issue