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

Function update_connection

plugins/test/run-route-overlong.c:136–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static void update_connection(int store_fd,
137 const struct node_id *from,
138 const struct node_id *to,
139 struct short_channel_id scid,
140 struct amount_msat min,
141 struct amount_msat max,
142 u32 base_fee, s32 proportional_fee,
143 u32 delay,
144 bool disable)
145{
146 secp256k1_ecdsa_signature dummy_sig;
147 u8 flags = node_id_idx(from, to);
148 u8 *msg;
149
150 if (disable)
151 flags |= ROUTING_FLAGS_DISABLED;
152
153 /* So valgrind doesn't complain */
154 memset(&dummy_sig, 0, sizeof(dummy_sig));
155
156 msg = towire_channel_update(tmpctx,
157 &dummy_sig,
158 &chainparams->genesis_blockhash,
159 scid, 0,
160 ROUTING_OPT_HTLC_MAX_MSAT,
161 flags,
162 delay,
163 min,
164 base_fee,
165 proportional_fee,
166 max);
167
168 write_to_store(store_fd, msg);
169}
170
171static void add_connection(int store_fd,
172 const struct node_id *from,

Callers 1

add_connectionFunction · 0.70

Calls 2

node_id_idxFunction · 0.85
write_to_storeFunction · 0.70

Tested by

no test coverage detected