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

Function equal

tests/fuzz/fuzz-wire-reply_channel_range.c:49–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static bool equal(const struct reply_channel_range *x,
50 const struct reply_channel_range *y)
51{
52 size_t upto_sync_complete = (uintptr_t)&x->sync_complete - (uintptr_t)x;
53 if (memcmp(x, y, upto_sync_complete) != 0)
54 return false;
55 if (x->sync_complete != y->sync_complete)
56 return false;
57
58 if (!tal_arr_eq(x->encoded_short_ids, y->encoded_short_ids))
59 return false;
60
61 assert(x->tlvs && y->tlvs);
62
63 if (!timestamps_tlv_equal(x->tlvs->timestamps_tlv,
64 y->tlvs->timestamps_tlv))
65 return false;
66
67 return tal_arr_eq(x->tlvs->checksums_tlv, y->tlvs->checksums_tlv);
68}
69
70void run(const u8 *data, size_t size)
71{

Callers

nothing calls this directly

Calls 1

timestamps_tlv_equalFunction · 0.85

Tested by

no test coverage detected