| 67 | } |
| 68 | |
| 69 | static void update_connection(int store_fd, |
| 70 | const struct node_id *from, |
| 71 | const struct node_id *to, |
| 72 | const char *shortid, |
| 73 | struct amount_msat min, |
| 74 | struct amount_msat max, |
| 75 | u32 base_fee, s32 proportional_fee, |
| 76 | u32 delay, |
| 77 | bool disable) |
| 78 | { |
| 79 | struct short_channel_id scid; |
| 80 | secp256k1_ecdsa_signature dummy_sig; |
| 81 | u8 *msg; |
| 82 | |
| 83 | /* So valgrind doesn't complain */ |
| 84 | memset(&dummy_sig, 0, sizeof(dummy_sig)); |
| 85 | |
| 86 | if (!short_channel_id_from_str(shortid, strlen(shortid), &scid)) |
| 87 | abort(); |
| 88 | |
| 89 | msg = towire_channel_update(tmpctx, |
| 90 | &dummy_sig, |
| 91 | &chainparams->genesis_blockhash, |
| 92 | scid, 0, |
| 93 | ROUTING_OPT_HTLC_MAX_MSAT, |
| 94 | node_id_idx(from, to) |
| 95 | + (disable ? ROUTING_FLAGS_DISABLED : 0), |
| 96 | delay, |
| 97 | min, |
| 98 | base_fee, |
| 99 | proportional_fee, |
| 100 | max); |
| 101 | |
| 102 | write_to_store(store_fd, msg); |
| 103 | } |
| 104 | |
| 105 | static void add_connection(int store_fd, |
| 106 | const struct node_id *from, |
no test coverage detected