MCPcopy Create free account
hub / github.com/ElementsProject/lightning / offer_str_nosig

Function offer_str_nosig

lightningd/offer.c:152–168  ·  view source on GitHub ↗

We store strings in the db, so removing signatures is easiest by conversion */

Source from the content-addressed store, hash-verified

150
151/* We store strings in the db, so removing signatures is easiest by conversion */
152static 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
170static struct command_result *json_listoffers(struct command *cmd,
171 const char *buffer,

Callers 2

json_listoffersFunction · 0.85
json_disableofferFunction · 0.85

Calls 3

offer_decodeFunction · 0.85
tal_freeFunction · 0.85
offer_encodeFunction · 0.85

Tested by

no test coverage detected