Skip to content

Commit 274d8f2

Browse files
Static asserts on imr_buf not needed
Since ed507e6 the imr_buf argument to verifyNoDuplicateIdentityRoots is no longer an array. Therefore the static checks are no longer needed.
1 parent 3879496 commit 274d8f2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

C/primitive/elements/exec.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ extern bool simplicity_elements_execSimplicity( simplicity_err* error, unsigned
9797
}
9898
if (IS_OK(*error)) {
9999
sha256_midstate imr_buf;
100-
static_assert(DAG_LEN_MAX <= SIZE_MAX / sizeof(sha256_midstate), "imr_buf array too large.");
101-
static_assert(1 <= DAG_LEN_MAX, "DAG_LEN_MAX is zero.");
102-
static_assert(DAG_LEN_MAX - 1 <= UINT32_MAX, "imr_buf array index does nto fit in uint32_t.");
103100
*error = simplicity_verifyNoDuplicateIdentityRoots(&imr_buf, dag, type_dag, (uint_fast32_t)dag_len);
104101
if (IS_OK(*error) && imr) sha256_fromMidstate(imr, imr_buf.s);
105102
}

0 commit comments

Comments
 (0)