We see this tx output spend to the splice funding address. */
| 728 | |
| 729 | /* We see this tx output spend to the splice funding address. */ |
| 730 | static void splice_found(struct lightningd *ld, |
| 731 | const struct bitcoin_tx *tx, |
| 732 | u32 outnum, |
| 733 | const struct txlocator *loc, |
| 734 | struct channel_inflight *inflight) |
| 735 | { |
| 736 | assert(!inflight->scid); |
| 737 | inflight->scid = tal(inflight, struct short_channel_id); |
| 738 | |
| 739 | if (!mk_short_channel_id(inflight->scid, |
| 740 | loc->blkheight, loc->index, |
| 741 | inflight->funding->outpoint.n)) { |
| 742 | inflight->scid = tal_free(inflight->scid); |
| 743 | channel_fail_permanent(inflight->channel, |
| 744 | REASON_LOCAL, |
| 745 | "Invalid funding scid %u:%u:%u", |
| 746 | loc->blkheight, loc->index, |
| 747 | inflight->funding->outpoint.n); |
| 748 | return; |
| 749 | } |
| 750 | |
| 751 | /* We will almost immediately get called, which is what we want! */ |
| 752 | watch_blockdepth(inflight, ld->topology, loc->blkheight, |
| 753 | splice_depth_cb, |
| 754 | splice_reorged_cb, |
| 755 | inflight); |
| 756 | } |
| 757 | |
| 758 | void watch_splice_inflight(struct lightningd *ld, |
| 759 | struct channel_inflight *inflight) |
nothing calls this directly
no test coverage detected