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

Function update_connection

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

Source from the content-addressed store, hash-verified

245}
246
247static void update_connection(int store_fd,
248 const struct node_id *from,
249 const struct node_id *to,
250 const struct short_channel_id *scid,
251 struct amount_msat min,
252 struct amount_msat max,
253 u32 base_fee, s32 proportional_fee,
254 u32 delay,
255 bool disable)
256{
257 secp256k1_ecdsa_signature dummy_sig;
258 u8 *msg;
259
260 /* So valgrind doesn't complain */
261 memset(&dummy_sig, 0, sizeof(dummy_sig));
262
263 msg = towire_channel_update(tmpctx,
264 &dummy_sig,
265 &chainparams->genesis_blockhash,
266 scid, 0,
267 ROUTING_OPT_HTLC_MAX_MSAT,
268 node_id_idx(from, to)
269 + (disable ? ROUTING_FLAGS_DISABLED : 0),
270 delay,
271 min,
272 base_fee,
273 proportional_fee,
274 max);
275
276 write_to_store(store_fd, msg);
277}
278
279static void add_connection(int store_fd,
280 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