Browse Source

peer: don't segv if closing before anchor established.

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

3
daemon/peer.c

@ -1013,6 +1013,9 @@ const struct htlc *peer_tx_revealed_r_value(struct peer *peer,
bool committed_to_htlcs(const struct peer *peer)
{
/* This is only set after anchor established. */
if (!peer->cstate)
return false;
return tal_count(peer->cstate->a.htlcs) != 0
|| tal_count(peer->cstate->b.htlcs) != 0;
}

Loading…
Cancel
Save