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

Function handle_init

tests/plugins/channeld_fakenet.c:1039–1179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1037}
1038
1039static struct channel *handle_init(struct info *info, const u8 *init_msg)
1040{
1041 struct feature_set *our_features;
1042 u32 *hsm_capabilities;
1043 struct channel_id channel_id;
1044 struct basepoints points[NUM_SIDES];
1045 struct amount_sat funding_sats;
1046 struct amount_msat local_msat;
1047 struct pubkey funding_pubkey[NUM_SIDES];
1048 struct channel_config conf[NUM_SIDES];
1049 struct bitcoin_outpoint funding;
1050 enum side opener;
1051 struct existing_htlc **htlcs;
1052 bool reconnected;
1053 u32 final_index;
1054 struct ext_key final_ext_key;
1055 u8 *fwd_msg;
1056 u32 minimum_depth, lease_expiry;
1057 struct secret last_remote_per_commit_secret;
1058 struct penalty_base *pbases;
1059 struct channel_type *channel_type;
1060 u32 feerate_splice, feerate_min, feerate_max, feerate_penalty, feerate_opening;
1061 u32 our_feerate_max;
1062 bool ignore_fee_limits;
1063 struct pubkey remote_per_commit;
1064 struct pubkey old_remote_per_commit;
1065 u32 commit_msec;
1066 bool last_was_revoke;
1067 struct changed_htlc *last_sent_commit;
1068 u64 revocations_received;
1069 u8 channel_flags;
1070 bool channel_ready[NUM_SIDES];
1071 u64 next_index[NUM_SIDES];
1072 u64 htlc_id, their_htlc_id;
1073 struct bitcoin_signature their_commit_sig;
1074 struct short_channel_id short_channel_ids[NUM_SIDES];
1075 bool send_shutdown;
1076 bool shutdown_sent[NUM_SIDES];
1077 u8 *final_scriptpubkey;
1078 u8 *their_features;
1079 u8 *remote_upfront_shutdown_script;
1080 u32 *dev_disable_commit;
1081 struct inflight **inflights;
1082 struct short_channel_id local_alias;
1083 struct channel *channel;
1084 const u8 *wscript;
1085 char *err_reason;
1086 struct wally_tx_output *direct_outputs[NUM_SIDES];
1087 struct htlc_map *htlc_map;
1088
1089 if (!fromwire_channeld_init(info, init_msg,
1090 &chainparams,
1091 &our_features,
1092 &hsm_capabilities,
1093 &channel_id,
1094 &funding,
1095 &funding_sats,
1096 &minimum_depth,

Callers 1

recv_reqFunction · 0.70

Calls 5

abortFunction · 0.85
new_full_channelFunction · 0.85
initial_channel_txFunction · 0.85
daemon_conn_sendFunction · 0.85
feature_offeredFunction · 0.50

Tested by

no test coverage detected