From ec9fbf03e4ea1829468a5e8ff9b0d617aa9bbeed Mon Sep 17 00:00:00 2001 From: Peter Bushnell Date: Wed, 31 Aug 2022 11:14:41 +0100 Subject: [PATCH] Change deprecated functions --- src/key.cpp | 4 ++-- src/spv/support/BRKey.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/key.cpp b/src/key.cpp index ccdb56997b..147f23bc72 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -165,7 +165,7 @@ void CKey::MakeNewKey(bool fCompressedIn) { bool CKey::Negate() { assert(fValid); - return secp256k1_ec_privkey_negate(secp256k1_context_sign, keydata.data()); + return secp256k1_ec_seckey_negate(secp256k1_context_sign, keydata.data()); } CPrivKey CKey::GetPrivKey() const { @@ -284,7 +284,7 @@ bool CKey::Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const } memcpy(ccChild.begin(), vout.data()+32, 32); memcpy((unsigned char*)keyChild.begin(), begin(), 32); - bool ret = secp256k1_ec_privkey_tweak_add(secp256k1_context_sign, (unsigned char*)keyChild.begin(), vout.data()); + bool ret = secp256k1_ec_seckey_tweak_add(secp256k1_context_sign, (unsigned char*)keyChild.begin(), vout.data()); keyChild.fCompressed = true; keyChild.fValid = ret; return ret; diff --git a/src/spv/support/BRKey.cpp b/src/spv/support/BRKey.cpp index 4088fbd66a..35cee9ec3b 100644 --- a/src/spv/support/BRKey.cpp +++ b/src/spv/support/BRKey.cpp @@ -101,7 +101,7 @@ static void _ctx_init() int BRSecp256k1ModAdd(UInt256 *a, const UInt256 *b) { std::call_once(_ctx_once, _ctx_init); - return secp256k1_ec_privkey_tweak_add(_ctx, (unsigned char *)a, (const unsigned char *)b); + return secp256k1_ec_seckey_tweak_add(_ctx, (unsigned char *)a, (const unsigned char *)b); } // multiplies 256bit big endian ints a and b (mod secp256k1 order) and stores the result in a @@ -109,7 +109,7 @@ int BRSecp256k1ModAdd(UInt256 *a, const UInt256 *b) int BRSecp256k1ModMul(UInt256 *a, const UInt256 *b) { std::call_once(_ctx_once, _ctx_init); - return secp256k1_ec_privkey_tweak_mul(_ctx, (unsigned char *)a, (const unsigned char *)b); + return secp256k1_ec_seckey_tweak_mul(_ctx, (unsigned char *)a, (const unsigned char *)b); } // multiplies secp256k1 generator by 256bit big endian int i and stores the result in p