Browse Source

peer: implement committed_to_htlcs().

Simply count how many HTLCs are in our current funding state.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 9 years ago
parent
commit
e1f772a443
  1. 4
      daemon/peer.c

4
daemon/peer.c

@ -674,8 +674,8 @@ const struct htlc *peer_tx_revealed_r_value(struct peer *peer,
bool committed_to_htlcs(const struct peer *peer)
{
/* FIXME */
return false;
return tal_count(peer->cstate->a.htlcs) != 0
|| tal_count(peer->cstate->b.htlcs) != 0;
}
/* Create a bitcoin close tx. */

Loading…
Cancel
Save