Commit a16c9e5
bulletproofs: expose a macro returning proof-size
This PR adds a convenience macro enabling callers to allocate the
necessary and sufficient space for an uncompressed rangeproof. In
particular, this makes it tractible to avoid pessimistically
over-allocating the maximum possible space an uncompressed
rangeproof might ever occupy.
Also, SECP256K1_BULLETPROOFS_RANGEPROOF_UNCOMPRESSED_MAX_LENGTH_ is
redefined as a short-cut leveraging the new convenience macro. This
both makes clear from where the maximum length is derived, and
should avoid the two macros drifting apart should the expected size
change (e.g., if compression is supported in the future).1 parent 027adf3 commit a16c9e5
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
17 | | - | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
0 commit comments