Skip to content

Commit

Permalink
closing_control: Fix loop limit in better_closing_fee.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZmnSCPxj authored and rustyrussell committed Apr 10, 2018
1 parent 86290b5 commit 9575136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightningd/closing_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static bool better_closing_fee(struct lightningd *ld,
fee -= tx->output[i].amount;

last_fee = channel->funding_satoshi;
for (i = 0; i < tal_count(channel->last_tx); i++)
for (i = 0; i < tal_count(channel->last_tx->output); i++)
last_fee -= channel->last_tx->output[i].amount;

log_debug(channel->log, "Their actual closing tx fee is %"PRIu64
Expand Down

0 comments on commit 9575136

Please sign in to comment.