Commit ff0509f
committed
policy: stop using duplicate keys in unit tests
We will want to start rejecting duplicate keys in policy. Currently
they are rejected in the compiler and when parsing (sane) Miniscripts
and when calling `is_valid` on concrete policies, but NOT when lifting
insane Miniscripts or when parsing concrete or semantic policies.
Meanwhile, mixing timelocks is checked in all the above places EXCEPT
when parsing concrete or semantic policies.
And of course, neither is checked when directly constructing Miniscripts
or policies.
It's all very inconsistent. My eventual goal is to use the same set of
"sane" checks everywhere. To do this, I will need to embed a set of
checks into Miniscript objects, and then later do the same with Policy
objects (which will need to stop being "bare recursive structs" and
start having more structure, same as Miniscript).1 parent 1b49a39 commit ff0509f
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
| 286 | + | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
0 commit comments