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

Function equal

tests/fuzz/fuzz-wire-open_channel.c:61–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static bool equal(const struct open_channel *x, const struct open_channel *y)
62{
63 size_t upto_channel_flags = (uintptr_t)&x->channel_flags - (uintptr_t)x;
64 if (memcmp(x, y, upto_channel_flags) != 0)
65 return false;
66 if (x->channel_flags != y->channel_flags)
67 return false;
68
69 assert(x->tlvs && y->tlvs);
70
71 if (!tal_arr_eq(x->tlvs->upfront_shutdown_script,
72 y->tlvs->upfront_shutdown_script))
73 return false;
74
75 return tal_arr_eq(x->tlvs->channel_type, y->tlvs->channel_type);
76}
77
78void run(const u8 *data, size_t size)
79{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected