| 73 | } |
| 74 | |
| 75 | static bool equal(const struct open_channel2 *x, const struct open_channel2 *y) |
| 76 | { |
| 77 | size_t upto_channel_flags = (uintptr_t)&x->channel_flags - (uintptr_t)x; |
| 78 | if (memcmp(x, y, upto_channel_flags) != 0) |
| 79 | return false; |
| 80 | if (x->channel_flags != y->channel_flags) |
| 81 | return false; |
| 82 | |
| 83 | assert(x->tlvs && y->tlvs); |
| 84 | |
| 85 | if (!tal_arr_eq(x->tlvs->upfront_shutdown_script, |
| 86 | y->tlvs->upfront_shutdown_script)) |
| 87 | return false; |
| 88 | |
| 89 | if (!tal_arr_eq(x->tlvs->channel_type, y->tlvs->channel_type)) |
| 90 | return false; |
| 91 | |
| 92 | if (!request_funds_equal(x->tlvs->request_funds, |
| 93 | y->tlvs->request_funds)) |
| 94 | return false; |
| 95 | |
| 96 | return !!x->tlvs->require_confirmed_inputs == |
| 97 | !!y->tlvs->require_confirmed_inputs; |
| 98 | } |
| 99 | |
| 100 | void run(const u8 *data, size_t size) |
| 101 | { |
nothing calls this directly
no test coverage detected