aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2024-05-09 13:32:22 +0200
committerTheCharlatan <seb.kung@gmail.com>2024-05-09 15:56:10 +0200
commit96378fe734e5fb6167eb20036d7170572a647edb (patch)
tree427126853cc23a7bb6aa89e5fb8b3527401eb6c7 /src
parent41eba5bd716bea47c8731d156d053afee92a7f12 (diff)
downloadbitcoin-96378fe734e5fb6167eb20036d7170572a647edb.tar.xz
Refactor: Remove ECC_Start and ECC_Stop from key header
They are unused outside of the key module now.
Diffstat (limited to 'src')
-rw-r--r--src/key.cpp6
-rw-r--r--src/key.h6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/key.cpp b/src/key.cpp
index 8f31146311..e8458f2e3b 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -432,7 +432,8 @@ bool ECC_InitSanityCheck() {
return key.VerifyPubKey(pubkey);
}
-void ECC_Start() {
+/** Initialize the elliptic curve support. May not be called twice without calling ECC_Stop first. */
+static void ECC_Start() {
assert(secp256k1_context_sign == nullptr);
secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
@@ -449,7 +450,8 @@ void ECC_Start() {
secp256k1_context_sign = ctx;
}
-void ECC_Stop() {
+/** Deinitialize the elliptic curve support. No-op if ECC_Start wasn't called first. */
+static void ECC_Stop() {
secp256k1_context *ctx = secp256k1_context_sign;
secp256k1_context_sign = nullptr;
diff --git a/src/key.h b/src/key.h
index 5454c007d3..36d093b7dc 100644
--- a/src/key.h
+++ b/src/key.h
@@ -236,12 +236,6 @@ struct CExtKey {
void SetSeed(Span<const std::byte> seed);
};
-/** Initialize the elliptic curve support. May not be called twice without calling ECC_Stop first. */
-void ECC_Start();
-
-/** Deinitialize the elliptic curve support. No-op if ECC_Start wasn't called first. */
-void ECC_Stop();
-
/** Check that required EC support is available at runtime. */
bool ECC_InitSanityCheck();