Browse Source

closing_control: Fix loop limit in better_closing_fee.

ppa-0.6.1
ZmnSCPxj 7 years ago
committed by Rusty Russell
parent
commit
957513666c
  1. 2
      lightningd/closing_control.c

2
lightningd/closing_control.c

@ -31,7 +31,7 @@ static bool better_closing_fee(struct lightningd *ld,
fee -= tx->output[i].amount; fee -= tx->output[i].amount;
last_fee = channel->funding_satoshi; 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; last_fee -= channel->last_tx->output[i].amount;
log_debug(channel->log, "Their actual closing tx fee is %"PRIu64 log_debug(channel->log, "Their actual closing tx fee is %"PRIu64

Loading…
Cancel
Save