Truncate length of *cursor (i.e. trim from end) */
| 201 | |
| 202 | /* Truncate length of *cursor (i.e. trim from end) */ |
| 203 | static bool trim_chars(size_t len, const char **cursor, size_t *max) |
| 204 | { |
| 205 | if (*max < len) |
| 206 | return false; |
| 207 | *max -= len; |
| 208 | return true; |
| 209 | } |
| 210 | |
| 211 | /* Helper to fetch data from payload as a valid hex buffer */ |
| 212 | static const u8 *decode_payload(const tal_t *ctx, const char *payload, size_t payload_len) |