A dual-funding candidate was mined and spent before lock-in. */
| 2664 | |
| 2665 | /* A dual-funding candidate was mined and spent before lock-in. */ |
| 2666 | static void adopt_opening_candidate(struct channel *channel, |
| 2667 | const struct channel_inflight *inflight) |
| 2668 | { |
| 2669 | struct amount_msat our_msat; |
| 2670 | |
| 2671 | log_unusual(channel->log, |
| 2672 | "Candidate funding %s spent before lock-in; adopting it", |
| 2673 | fmt_bitcoin_outpoint(tmpctx, &inflight->funding->outpoint)); |
| 2674 | update_channel_from_inflight(channel->peer->ld, channel, inflight, |
| 2675 | false); |
| 2676 | if (amount_sat_to_msat(&our_msat, channel->our_funds)) { |
| 2677 | channel->our_msat = our_msat; |
| 2678 | channel->msat_to_us_min = our_msat; |
| 2679 | channel->msat_to_us_max = our_msat; |
| 2680 | } |
| 2681 | } |
| 2682 | |
| 2683 | /* A splice candidate was mined and spent before splice_locked, which |
| 2684 | * needs the peer: do what handle_peer_splice_locked() would have. */ |
no test coverage detected