| 1707 | } |
| 1708 | |
| 1709 | static void handle_peer_locked(struct subd *dualopend, const u8 *msg) |
| 1710 | { |
| 1711 | struct pubkey remote_per_commit; |
| 1712 | struct channel *channel = dualopend->channel; |
| 1713 | |
| 1714 | if (!fromwire_dualopend_peer_locked(msg, &remote_per_commit)) { |
| 1715 | channel_internal_error(channel, |
| 1716 | "Bad WIRE_DUALOPEND_PEER_LOCKED: %s", |
| 1717 | tal_hex(msg, msg)); |
| 1718 | return; |
| 1719 | } |
| 1720 | |
| 1721 | /* Updates channel with the next per-commit point etc, calls |
| 1722 | * channel_internal_error on failure */ |
| 1723 | if (!channel_on_channel_ready(channel, &remote_per_commit)) |
| 1724 | return; |
| 1725 | |
| 1726 | /* Remember that we got the lock-in */ |
| 1727 | wallet_channel_save(dualopend->ld->wallet, channel); |
| 1728 | } |
| 1729 | |
| 1730 | static void handle_channel_locked(struct subd *dualopend, |
| 1731 | const int *fds, |
no test coverage detected