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

Function equal

tests/fuzz/fuzz-wire-accept_channel2.c:80–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80static bool equal(const struct accept_channel2 *x,
81 const struct accept_channel2 *y)
82{
83 size_t upto_tlvs = (uintptr_t)&x->tlvs - (uintptr_t)x;
84 if (memcmp(x, y, upto_tlvs) != 0)
85 return false;
86
87 assert(x->tlvs && y->tlvs);
88
89 if (!tal_arr_eq(x->tlvs->upfront_shutdown_script,
90 y->tlvs->upfront_shutdown_script))
91 return false;
92
93 if (!tal_arr_eq(x->tlvs->channel_type, y->tlvs->channel_type))
94 return false;
95
96 if (!!x->tlvs->require_confirmed_inputs !=
97 !!y->tlvs->require_confirmed_inputs)
98 return false;
99
100 return will_fund_equal(x->tlvs->will_fund, y->tlvs->will_fund);
101}
102
103void run(const u8 *data, size_t size)
104{

Callers

nothing calls this directly

Calls 1

will_fund_equalFunction · 0.85

Tested by

no test coverage detected