| 131 | } |
| 132 | |
| 133 | void run(const uint8_t *data, size_t size) |
| 134 | { |
| 135 | struct io_conn *conn; |
| 136 | struct crypto_state cs; |
| 137 | struct early_peer *peer; |
| 138 | u8 *encoded_msg; |
| 139 | const struct node_id id = {{ |
| 140 | 02, |
| 141 | 00, 00, 00, 00, |
| 142 | 00, 00, 00, 00, |
| 143 | 00, 00, 00, 00, |
| 144 | 00, 00, 00, 00, |
| 145 | 00, 00, 00, 00, |
| 146 | 00, 00, 00, 00, |
| 147 | 00, 00, 00, 00, |
| 148 | 00, 00, 00, 00 }}; |
| 149 | |
| 150 | encoded_msg = encode_msg(tmpctx, data, size, &cs); |
| 151 | peer = tal(tmpctx, struct early_peer); |
| 152 | peer->cs = cs; |
| 153 | peer->msg = encoded_msg; |
| 154 | peer->incoming = true; |
| 155 | peer->daemon = talz(tmpctx, struct daemon); |
| 156 | peer->timeout = NULL; |
| 157 | peer->id = id; |
| 158 | |
| 159 | conn = io_new_conn(tmpctx, -1, do_nothing, NULL); |
| 160 | peer_init_received(conn, peer); |
| 161 | |
| 162 | clean_tmpctx(); |
| 163 | } |
nothing calls this directly
no test coverage detected