From 385c2a59050252e200ee10ea30a2ad52c226d113 Mon Sep 17 00:00:00 2001 From: sstone Date: Fri, 27 May 2016 16:53:01 +0200 Subject: [PATCH] setup_first_commit: initialize their remote commit with their commit fee rate --- daemon/peer.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/daemon/peer.c b/daemon/peer.c index ef15ad936..d52d33260 100644 --- a/daemon/peer.c +++ b/daemon/peer.c @@ -2137,8 +2137,14 @@ bool setup_first_commit(struct peer *peer) if (!peer->local.commit->cstate) return false; - peer->remote.commit->cstate = copy_funding(peer, - peer->local.commit->cstate); + peer->remote.commit->cstate = initial_funding(peer, + peer->anchor.satoshis, + peer->remote.commit_fee_rate, + peer->local.offer_anchor + == CMD_OPEN_WITH_ANCHOR ? + OURS : THEIRS); + if (!peer->remote.commit->cstate) + return false; peer->local.commit->tx = create_commit_tx(peer->local.commit, &peer->local.finalkey,