Commit 4109aaf
committed
Merge #917: Fix panic in compile_tr_private_experimental for non-expandable policies
f728d78 fix(policy): fix panic in compile_tr_private_experimental for non-expandable policies (Yeji Han)
Pull request description:
Closes #902.
- Keep `pol_prob_map` in sync with `tapleaf_prob_vec` by removing entries from both data structures together.
- Previously, removing a node from `tapleaf_prob_vec` without removing it from `pol_prob_map` caused a panic when `expand_fn` returned the same policy (e.g. for `pk(A)` or `and(pk(A),pk(B))`).
- Adds regression tests for both cases.
ACKs for top commit:
apoelstra:
ACK f728d78; successfully ran local tests
Tree-SHA512: da733d9d60329ef909c50fac87675542056fa441cf3bc1bb101581ec89f885dc23cdeafe7786c6414fcb50b0560f1aff17da3dca91604d1acbac117e8607857f1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| 617 | + | |
617 | 618 | | |
618 | 619 | | |
619 | 620 | | |
620 | 621 | | |
| 622 | + | |
621 | 623 | | |
622 | 624 | | |
623 | 625 | | |
| |||
1276 | 1278 | | |
1277 | 1279 | | |
1278 | 1280 | | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
1279 | 1296 | | |
1280 | 1297 | | |
1281 | 1298 | | |
| |||
0 commit comments