| 49 | } |
| 50 | |
| 51 | static char *check_features_and_chain(const tal_t *ctx, |
| 52 | const struct feature_set *our_features, |
| 53 | const struct chainparams *must_be_chain, |
| 54 | const u8 *features, |
| 55 | const struct bitcoin_blkid *chains, |
| 56 | size_t num_chains) |
| 57 | { |
| 58 | if (must_be_chain) { |
| 59 | if (!bolt12_chains_match(chains, num_chains, must_be_chain)) |
| 60 | return tal_fmt(ctx, "wrong chain"); |
| 61 | } |
| 62 | |
| 63 | if (our_features) { |
| 64 | int badf = features_unsupported(our_features, features, |
| 65 | BOLT11_FEATURE); |
| 66 | if (badf != -1) |
| 67 | return tal_fmt(ctx, "unknown feature bit %i", badf); |
| 68 | } |
| 69 | |
| 70 | return NULL; |
| 71 | } |
| 72 | |
| 73 | bool bolt12_check_signature(const struct tlv_field *fields, |
| 74 | const char *messagename, |
no test coverage detected