@@ -197,11 +197,12 @@ static CBLSPublicKey ParseBLSPubKey(const std::string& hexKey, const std::string
197197 return pubKey;
198198}
199199
200- static CBLSSecretKey ParseBLSSecretKey (const std::string& hexKey, const std::string& paramName, bool specific_legacy_bls_scheme )
200+ static CBLSSecretKey ParseBLSSecretKey (const std::string& hexKey, const std::string& paramName)
201201{
202202 CBLSSecretKey secKey;
203203
204- if (!secKey.SetHexStr (hexKey, specific_legacy_bls_scheme)) {
204+ // Actually, bool flag for bls::PrivateKey has other meaning (modOrder)
205+ if (!secKey.SetHexStr (hexKey, false )) {
205206 throw JSONRPCError (RPC_INVALID_PARAMETER, strprintf (" %s must be a valid BLS secret key" , paramName));
206207 }
207208 return secKey;
@@ -964,7 +965,6 @@ static UniValue protx_update_service_common_wrapper(const JSONRPCRequest& reques
964965 EnsureWalletIsUnlocked (*wallet);
965966
966967 const bool isV19active{DeploymentActiveAfter (WITH_LOCK (cs_main, return chainman.ActiveChain ().Tip ();), Params ().GetConsensus (), Consensus::DEPLOYMENT_V19)};
967- const bool is_bls_legacy = !isV19active;
968968 if (isEvoRequested && !isV19active) {
969969 throw JSONRPCError (RPC_INVALID_REQUEST, " EvoNodes aren't allowed yet" );
970970 }
@@ -979,7 +979,7 @@ static UniValue protx_update_service_common_wrapper(const JSONRPCRequest& reques
979979 throw std::runtime_error (strprintf (" invalid network address %s" , request.params [1 ].get_str ()));
980980 }
981981
982- CBLSSecretKey keyOperator = ParseBLSSecretKey (request.params [2 ].get_str (), " operatorKey" , is_bls_legacy );
982+ CBLSSecretKey keyOperator = ParseBLSSecretKey (request.params [2 ].get_str (), " operatorKey" );
983983
984984 size_t paramIdx = 3 ;
985985 if (isEvoRequested) {
@@ -1210,12 +1210,11 @@ static RPCHelpMan protx_revoke()
12101210 EnsureWalletIsUnlocked (*pwallet);
12111211
12121212 const bool isV19active{DeploymentActiveAfter (WITH_LOCK (cs_main, return chainman.ActiveChain ().Tip ();), Params ().GetConsensus (), Consensus::DEPLOYMENT_V19)};
1213- const bool is_bls_legacy = !isV19active;
12141213 CProUpRevTx ptx;
12151214 ptx.nVersion = CProUpRevTx::GetVersion (isV19active);
12161215 ptx.proTxHash = ParseHashV (request.params [0 ], " proTxHash" );
12171216
1218- CBLSSecretKey keyOperator = ParseBLSSecretKey (request.params [1 ].get_str (), " operatorKey" , is_bls_legacy );
1217+ CBLSSecretKey keyOperator = ParseBLSSecretKey (request.params [1 ].get_str (), " operatorKey" );
12191218
12201219 if (!request.params [2 ].isNull ()) {
12211220 int32_t nReason = ParseInt32V (request.params [2 ], " reason" );
@@ -1766,7 +1765,7 @@ static RPCHelpMan bls_fromsecret()
17661765 if (!request.params [1 ].isNull ()) {
17671766 bls_legacy_scheme = ParseBoolV (request.params [1 ], " bls_legacy_scheme" );
17681767 }
1769- CBLSSecretKey sk = ParseBLSSecretKey (request.params [0 ].get_str (), " secretKey" , bls_legacy_scheme );
1768+ CBLSSecretKey sk = ParseBLSSecretKey (request.params [0 ].get_str (), " secretKey" );
17701769 UniValue ret (UniValue::VOBJ);
17711770 ret.pushKV (" secret" , sk.ToString ());
17721771 ret.pushKV (" public" , sk.GetPublicKey ().ToString (bls_legacy_scheme));
0 commit comments