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_staticeverywhere directly and get rid of thectxfield in thebench_ecdh_datastruct (less flexible for future changes, deviates from other bench structures)
Found while reviewing #1698, see #1698 (review).