We store strings in the db, so removing signatures is easiest by conversion */
| 150 | |
| 151 | /* We store strings in the db, so removing signatures is easiest by conversion */ |
| 152 | static const char *offer_str_nosig(const tal_t *ctx, |
| 153 | struct lightningd *ld, |
| 154 | const char *b12str) |
| 155 | { |
| 156 | char *fail; |
| 157 | struct tlv_offer *offer = offer_decode(tmpctx, b12str, strlen(b12str), |
| 158 | ld->our_features, chainparams, |
| 159 | &fail); |
| 160 | |
| 161 | if (!offer) { |
| 162 | log_broken(ld->log, "Cannot reparse offerstr from db %s: %s", |
| 163 | b12str, fail); |
| 164 | return NULL; |
| 165 | } |
| 166 | offer->signature = tal_free(offer->signature); |
| 167 | return offer_encode(ctx, offer); |
| 168 | } |
| 169 | |
| 170 | static struct command_result *json_listoffers(struct command *cmd, |
| 171 | const char *buffer, |
no test coverage detected