| 181 | } |
| 182 | |
| 183 | void run(const u8 *data, size_t size) |
| 184 | { |
| 185 | struct tlv_invoice_request *invreq, *decoded_invreq; |
| 186 | const char *fail = NULL, *encoded_invreq; |
| 187 | |
| 188 | invreq = invrequest_decode(tmpctx, (const char *)data, size, |
| 189 | /*feature_set=*/NULL, /*must_be_chain=*/NULL, &fail); |
| 190 | if (!invreq) |
| 191 | goto cleanup; |
| 192 | |
| 193 | encoded_invreq = invrequest_encode(tmpctx, invreq); |
| 194 | |
| 195 | decoded_invreq = invrequest_decode(tmpctx, encoded_invreq, strlen(encoded_invreq), |
| 196 | NULL, NULL, &fail); |
| 197 | assert(!fail); |
| 198 | assert(decoded_invreq); |
| 199 | assert(tlv_invoice_request_eq(invreq, decoded_invreq)); |
| 200 | |
| 201 | cleanup: |
| 202 | clean_tmpctx(); |
| 203 | } |
nothing calls this directly
no test coverage detected