MCPcopy Create free account
hub / github.com/ElementsProject/lightning / handle_peer_locked

Function handle_peer_locked

lightningd/dual_open_control.c:1709–1728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1707}
1708
1709static 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
1730static void handle_channel_locked(struct subd *dualopend,
1731 const int *fds,

Callers 1

dual_opend_msgFunction · 0.85

Calls 4

tal_hexFunction · 0.85
channel_on_channel_readyFunction · 0.85
channel_internal_errorFunction · 0.70
wallet_channel_saveFunction · 0.50

Tested by

no test coverage detected