diff options
author | Pieter Wuille <pieter@wuille.net> | 2022-12-13 14:47:54 -0500 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2022-12-13 15:08:26 -0500 |
commit | 202291722300b86f36e97de7960d40a32544c2d1 (patch) | |
tree | 10d066805d3d6534addbf71fdcbe36243fe8329d /src/pubkey.cpp | |
parent | 3bfca788b0dae879bfc745cc52c2cb6edc49fd70 (diff) | |
download | bitcoin-202291722300b86f36e97de7960d40a32544c2d1.tar.xz |
Add secp256k1_selftest call
Diffstat (limited to 'src/pubkey.cpp')
-rw-r--r-- | src/pubkey.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pubkey.cpp b/src/pubkey.cpp index 6c068fcc06..fe684b264b 100644 --- a/src/pubkey.cpp +++ b/src/pubkey.cpp @@ -16,6 +16,18 @@ #include <algorithm> #include <cassert> +namespace { + +struct Secp256k1SelfTester +{ + Secp256k1SelfTester() { + /* Run libsecp256k1 self-test before using the secp256k1_context_static. */ + secp256k1_selftest(); + } +} SECP256K1_SELFTESTER; + +} // namespace + /** This function is taken from the libsecp256k1 distribution and implements * DER parsing for ECDSA signatures, while supporting an arbitrary subset of * format violations. |