| 45 | } |
| 46 | |
| 47 | static bool blinded_path_eq(const struct blinded_path *a, const struct blinded_path *b) |
| 48 | { |
| 49 | if (!sciddir_or_pubkey_eq(&a->first_node_id, &b->first_node_id)) |
| 50 | return false; |
| 51 | if (!pubkey_eq(&a->first_path_key, &b->first_path_key)) |
| 52 | return false; |
| 53 | if (tal_count(a->path) != tal_count(b->path)) |
| 54 | return false; |
| 55 | for (size_t i = 0; i < tal_count(a->path); i++) { |
| 56 | const struct blinded_path_hop *h1 = a->path[i]; |
| 57 | const struct blinded_path_hop *h2 = b->path[i]; |
| 58 | if (h1 == h2) |
| 59 | continue; |
| 60 | if (!h1 || !h2) |
| 61 | return false; |
| 62 | if (!pubkey_eq(&h1->blinded_node_id, &h2->blinded_node_id)) |
| 63 | return false; |
| 64 | if (tal_bytelen(h1->encrypted_recipient_data) != |
| 65 | tal_bytelen(h2->encrypted_recipient_data)) |
| 66 | return false; |
| 67 | if (memcmp(h1->encrypted_recipient_data, h2->encrypted_recipient_data, |
| 68 | tal_bytelen(h1->encrypted_recipient_data)) != 0) |
| 69 | return false; |
| 70 | } |
| 71 | return true; |
| 72 | } |
| 73 | |
| 74 | static bool invreq_bip_353_name_eq(const struct bip_353_name *a, |
| 75 | const struct bip_353_name *b) |
nothing calls this directly
no test coverage detected