| 53 | } |
| 54 | |
| 55 | static void update_connection(int store_fd, |
| 56 | const struct node_id *from, |
| 57 | const struct node_id *to, |
| 58 | u32 base_fee, s32 proportional_fee, |
| 59 | u32 delay, |
| 60 | bool disable) |
| 61 | { |
| 62 | struct short_channel_id scid; |
| 63 | secp256k1_ecdsa_signature dummy_sig; |
| 64 | u8 *msg; |
| 65 | |
| 66 | /* So valgrind doesn't complain */ |
| 67 | memset(&dummy_sig, 0, sizeof(dummy_sig)); |
| 68 | |
| 69 | /* Make a unique scid. */ |
| 70 | memcpy(&scid, from, sizeof(scid) / 2); |
| 71 | memcpy((char *)&scid + sizeof(scid) / 2, to, sizeof(scid) / 2); |
| 72 | |
| 73 | msg = towire_channel_update(tmpctx, |
| 74 | &dummy_sig, |
| 75 | &chainparams->genesis_blockhash, |
| 76 | &scid, 0, |
| 77 | ROUTING_OPT_HTLC_MAX_MSAT, |
| 78 | node_id_idx(from, to) |
| 79 | + (disable ? ROUTING_FLAGS_DISABLED : 0), |
| 80 | delay, |
| 81 | AMOUNT_MSAT(0), |
| 82 | base_fee, |
| 83 | proportional_fee, |
| 84 | AMOUNT_MSAT(100000 * 1000)); |
| 85 | |
| 86 | write_to_store(store_fd, msg); |
| 87 | } |
| 88 | |
| 89 | static void add_connection(int store_fd, |
| 90 | const struct node_id *from, |
no test coverage detected