BOLT #11: * * * `s` (16): `data_length` 52. This 256-bit secret prevents * forwarding nodes from probing the payment recipient. */
| 347 | * forwarding nodes from probing the payment recipient. |
| 348 | */ |
| 349 | static const char *decode_s(struct bolt11 *b11, |
| 350 | const struct feature_set *our_features, |
| 351 | struct hash_u5 *hu5, |
| 352 | const u5 **data, size_t *field_len, |
| 353 | bool *have_s) |
| 354 | { |
| 355 | const char *err; |
| 356 | struct secret secret; |
| 357 | |
| 358 | assert(!*have_s); |
| 359 | |
| 360 | /* BOLT #11: |
| 361 | * |
| 362 | * A reader... |
| 363 | * - MUST fail the payment if any field with fixed `data_length` (`p`, `h`, `s`, `n`) |
| 364 | * does not have the correct length (52, 52, 52, 53). */ |
| 365 | err = pull_expected_length(b11, hu5, data, field_len, 52, 's', |
| 366 | have_s, &secret); |
| 367 | if (*have_s) |
| 368 | b11->payment_secret = tal_dup(b11, struct secret, &secret); |
| 369 | return err; |
| 370 | } |
| 371 | |
| 372 | /* BOLT #11: |
| 373 | * |
nothing calls this directly
no test coverage detected