Browse Source

peer: resend failures on restart/reconnect.

If we've not relayed a failure yet (ie. we relayed it instantly, but it
wasn't confirmed), we need to redo it.

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

8
daemon/peer.c

@ -650,11 +650,13 @@ static void retry_all_routing(struct peer *restarted_peer)
for (h = htlc_map_first(&restarted_peer->htlcs, &it);
h;
h = htlc_map_next(&restarted_peer->htlcs, &it)) {
if (h->r && h->state == RCVD_ADD_ACK_REVOCATION)
if (h->state != RCVD_ADD_ACK_REVOCATION)
continue;
if (h->r)
command_htlc_fulfill(restarted_peer, h);
else if (h->fail)
command_htlc_fail(restarted_peer, h);
}
/* FIXME: Also any HTLCs which were failed! */
}
static void adjust_cstate_side(struct channel_state *cstate,

Loading…
Cancel
Save