Skip to content

Commit 385c2a5

Browse files
committed
setup_first_commit: initialize their remote commit with their commit fee rate
1 parent 9bb070f commit 385c2a5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

daemon/peer.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,8 +2137,14 @@ bool setup_first_commit(struct peer *peer)
21372137
if (!peer->local.commit->cstate)
21382138
return false;
21392139

2140-
peer->remote.commit->cstate = copy_funding(peer,
2141-
peer->local.commit->cstate);
2140+
peer->remote.commit->cstate = initial_funding(peer,
2141+
peer->anchor.satoshis,
2142+
peer->remote.commit_fee_rate,
2143+
peer->local.offer_anchor
2144+
== CMD_OPEN_WITH_ANCHOR ?
2145+
OURS : THEIRS);
2146+
if (!peer->remote.commit->cstate)
2147+
return false;
21422148

21432149
peer->local.commit->tx = create_commit_tx(peer->local.commit,
21442150
&peer->local.finalkey,

0 commit comments

Comments
 (0)