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

Function equal

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

Source from the content-addressed store, hash-verified

52}
53
54static bool equal(const struct node_announcement *x,
55 const struct node_announcement *y)
56{
57 if (memcmp(&x->signature, &y->signature, sizeof(x->signature)) != 0)
58 return false;
59 if (!tal_arr_eq(x->features, y->features))
60 return false;
61 if (x->timestamp != y->timestamp)
62 return false;
63 if (!node_id_eq(&x->node_id, &y->node_id))
64 return false;
65 if (memcmp(x->rgb_color, y->rgb_color, sizeof(x->rgb_color)) != 0)
66 return false;
67 if (memcmp(x->alias, y->alias, sizeof(x->alias)) != 0)
68 return false;
69 if (!tal_arr_eq(x->addresses, y->addresses))
70 return false;
71
72 assert(x->tlvs && y->tlvs);
73
74 return lease_rates_equal(x->tlvs->option_will_fund,
75 y->tlvs->option_will_fund);
76}
77
78void run(const u8 *data, size_t size)
79{

Callers

nothing calls this directly

Calls 2

node_id_eqFunction · 0.85
lease_rates_equalFunction · 0.85

Tested by

no test coverage detected