| 310 | } |
| 311 | |
| 312 | struct rune_restr *rune_restr_from_string(const tal_t *ctx, |
| 313 | const char *str, |
| 314 | size_t len) |
| 315 | { |
| 316 | struct rune_restr *restr; |
| 317 | |
| 318 | restr = rune_restr_decode(NULL, &str, &len); |
| 319 | /* Don't allow trailing chars */ |
| 320 | if (restr && len != 0) |
| 321 | restr = tal_free(restr); |
| 322 | return tal_steal(ctx, restr); |
| 323 | } |
| 324 | |
| 325 | static void to_string(struct wbuf *wbuf, const struct rune *rune, u8 *hash32) |
| 326 | { |