common: Add ECC_Context RAII wrapper for ECC_Start/ECC_Stop

This commit is contained in:
Ryan Ofsky
2024-05-07 08:52:55 -04:00
committed by TheCharlatan
parent 6f1d906438
commit 538fedde1d
2 changed files with 24 additions and 0 deletions

View File

@@ -457,3 +457,13 @@ void ECC_Stop() {
secp256k1_context_destroy(ctx);
}
}
ECC_Context::ECC_Context()
{
ECC_Start();
}
ECC_Context::~ECC_Context()
{
ECC_Stop();
}