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

Function handle_peer_locked

lightningd/dual_open_control.c:1911–1933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1909}
1910
1911static void handle_peer_locked(struct subd *dualopend, const u8 *msg)
1912{
1913 struct pubkey remote_per_commit;
1914 struct channel *channel = dualopend->channel;
1915 struct short_channel_id *remote_alias;
1916
1917 if (!fromwire_dualopend_peer_locked(msg, msg,
1918 &remote_per_commit,
1919 &remote_alias)) {
1920 channel_internal_error(channel,
1921 "Bad WIRE_DUALOPEND_PEER_LOCKED: %s",
1922 tal_hex(msg, msg));
1923 return;
1924 }
1925
1926 /* Updates channel with the next per-commit point etc, calls
1927 * channel_internal_error on failure */
1928 if (!channel_on_channel_ready(channel, &remote_per_commit, remote_alias))
1929 return;
1930
1931 /* Remember that we got the lock-in */
1932 wallet_channel_save(dualopend->ld->wallet, channel);
1933}
1934
1935static void handle_channel_locked(struct subd *dualopend,
1936 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