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

Function cache_param

lightningd/runes.c:713–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711static const jsmntok_t ambiguous_param;
712
713static void cache_param(struct cond_info *cinfo, const char *name,
714 const jsmntok_t *val)
715{
716 const jsmntok_t *old = strmap_get(&cinfo->cached_params, name);
717
718 if (!old) {
719 strmap_add(&cinfo->cached_params, name, val);
720 } else if (old != val) {
721 strmap_del(&cinfo->cached_params, name, NULL);
722 strmap_add(&cinfo->cached_params, name, &ambiguous_param);
723 }
724}
725
726/* Returns the parameter name and set *invf, or NULL */
727static const char *match_inv_condition(const tal_t *ctx,

Callers 1

check_conditionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected