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

Function test_field_eq

plugins/offers_inv_hook.c:112–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112static struct command_result *
113test_field_eq(struct command *cmd,
114 const struct inv *inv,
115 const tal_t *invfield,
116 const tal_t *offerfield,
117 const char *fieldname)
118{
119 if (invfield && !offerfield)
120 return fail_inv(cmd, inv, "Unexpected %s", fieldname);
121 if (!invfield && offerfield)
122 return fail_inv(cmd, inv, "Expected %s", fieldname);
123 if (!memeq(invfield, tal_bytelen(invfield),
124 offerfield, tal_bytelen(offerfield)))
125 return fail_inv(cmd, inv, "Different %s", fieldname);
126 return NULL;
127}
128
129static struct command_result *pay_done(struct command *cmd,
130 const char *buf,

Callers

nothing calls this directly

Calls 3

fail_invFunction · 0.85
memeqFunction · 0.85
tal_bytelenFunction · 0.85

Tested by

no test coverage detected