@@ -180,6 +180,19 @@ static RPCArg GetRpcArg(const std::string& strParamName)
180180 return it->second ;
181181}
182182
183+ static CBLSSecretKey ParseBLSSecretKey (const std::string& hexKey, const std::string& paramName)
184+ {
185+ CBLSSecretKey secKey;
186+
187+ // Actually, bool flag for bls::PrivateKey has other meaning (modOrder)
188+ if (!secKey.SetHexStr (hexKey, false )) {
189+ throw JSONRPCError (RPC_INVALID_PARAMETER, strprintf (" %s must be a valid BLS secret key" , paramName));
190+ }
191+ return secKey;
192+ }
193+
194+ #ifdef ENABLE_WALLET
195+
183196static CKeyID ParsePubKeyIDFromAddress (const std::string& strAddress, const std::string& paramName)
184197{
185198 CTxDestination dest = DecodeDestination (strAddress);
@@ -199,24 +212,11 @@ static CBLSPublicKey ParseBLSPubKey(const std::string& hexKey, const std::string
199212 return pubKey;
200213}
201214
202- static CBLSSecretKey ParseBLSSecretKey (const std::string& hexKey, const std::string& paramName)
203- {
204- CBLSSecretKey secKey;
205-
206- // Actually, bool flag for bls::PrivateKey has other meaning (modOrder)
207- if (!secKey.SetHexStr (hexKey, false )) {
208- throw JSONRPCError (RPC_INVALID_PARAMETER, strprintf (" %s must be a valid BLS secret key" , paramName));
209- }
210- return secKey;
211- }
212-
213215static bool ValidatePlatformPort (const int32_t port)
214216{
215217 return port >= 1 && port <= std::numeric_limits<uint16_t >::max ();
216218}
217219
218- #ifdef ENABLE_WALLET
219-
220220template <typename SpecialTxPayload>
221221static void FundSpecialTx (CWallet& wallet, CMutableTransaction& tx, const SpecialTxPayload& payload,
222222 const CTxDestination& fundDest) EXCLUSIVE_LOCKS_REQUIRED(!wallet.cs_wallet)
0 commit comments