| 553 | } |
| 554 | |
| 555 | static void htlc_offer_timeout(struct htlc_out *out) |
| 556 | { |
| 557 | struct channel *channel = out->key.channel; |
| 558 | |
| 559 | out->timeout = NULL; |
| 560 | |
| 561 | /* Otherwise, timer would be removed. */ |
| 562 | assert(out->hstate == SENT_ADD_HTLC); |
| 563 | |
| 564 | /* If owner died, we should already be taken care of. */ |
| 565 | if (!channel->owner || channel->state != CHANNELD_NORMAL) |
| 566 | return; |
| 567 | |
| 568 | log_unusual(channel->owner->log, |
| 569 | "Adding HTLC %"PRIu64" too slow: killing connection", |
| 570 | out->key.id); |
| 571 | tal_free(channel->owner); |
| 572 | channel_set_billboard(channel, false, |
| 573 | "Adding HTLC timed out: killed connection"); |
| 574 | } |
| 575 | |
| 576 | /* Returns failmsg, or NULL on success. */ |
| 577 | const u8 *send_htlc_out(const tal_t *ctx, |
nothing calls this directly
no test coverage detected