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

Function equal

tests/fuzz/fuzz-wire-update_add_htlc.c:37–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static bool equal(const struct update_add_htlc *x,
38 const struct update_add_htlc *y)
39{
40 size_t upto_expiry = (uintptr_t)&x->expiry - (uintptr_t)x;
41 if (memcmp(x, y, upto_expiry) != 0)
42 return false;
43 if (x->expiry != y->expiry)
44 return false;
45 if (memcmp(x->onion_routing_packet, y->onion_routing_packet,
46 sizeof(x->onion_routing_packet)) != 0)
47 return false;
48
49 assert(x->tlvs && y->tlvs);
50 return tal_arr_eq(x->tlvs->blinded_path, y->tlvs->blinded_path);
51}
52
53void run(const u8 *data, size_t size)
54{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected