mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
common: Add ECC_Context RAII wrapper for ECC_Start/ECC_Stop
This commit is contained in:
10
src/key.cpp
10
src/key.cpp
@@ -457,3 +457,13 @@ void ECC_Stop() {
|
||||
secp256k1_context_destroy(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
ECC_Context::ECC_Context()
|
||||
{
|
||||
ECC_Start();
|
||||
}
|
||||
|
||||
ECC_Context::~ECC_Context()
|
||||
{
|
||||
ECC_Stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user