| 245 | } |
| 246 | |
| 247 | static 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 | |
| 279 | static void add_connection(int store_fd, |
| 280 | const struct node_id *from, |
no test coverage detected