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

Function update_connection

plugins/test/run-route-calc.c:140–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

add_connectionFunction · 0.70

Calls 2

node_id_idxFunction · 0.85
write_to_storeFunction · 0.70

Tested by

no test coverage detected