Calling secp256k1_context_create
with SECP256K1_FLAGS_TYPE_CONTEXT
seems to be confusing and not strictly API-compliant, as the only allowed (non-deprecated) value is SECP256K1_CONTEXT_NONE
, even if the former happens to map to the latter currently.
Fix this by not dynamically creating a context in the first place and switch to using the static context, as it is sufficient for this benchmark and presumably matches what the “no capabilities” comment intended back then.
Alternatives are:
- keep the signing context and only fix the name, i.e. s/_FLAGS_TYPE_CONTEXT/_CONTEXT_NONE/
- use
secp256k1_context_static
everywhere directly and get rid of thectx
field in thebench_ecdh_data
struct (less flexible for future changes, deviates from other bench structures)
Found while reviewing #1698, see #1698 (review).