kernel: Remove Univalue from kernel library

It is not required by any of the kernel components.
A JSON library should not need to be part of a consensus library.
This commit is contained in:
TheCharlatan
2023-07-21 14:37:03 +02:00
parent 10eb3a9faa
commit 6960c81cbf
5 changed files with 12 additions and 21 deletions

View File

@@ -10,7 +10,6 @@
#include <script/sign.h>
#include <serialize.h>
#include <streams.h>
#include <univalue.h>
#include <util/result.h>
#include <util/strencodings.h>
#include <version.h>
@@ -243,16 +242,6 @@ bool ParseHashStr(const std::string& strHex, uint256& result)
return true;
}
std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName)
{
std::string strHex;
if (v.isStr())
strHex = v.getValStr();
if (!IsHex(strHex))
throw std::runtime_error(strName + " must be hexadecimal string (not '" + strHex + "')");
return ParseHex(strHex);
}
util::Result<int> SighashFromStr(const std::string& sighash)
{
static std::map<std::string, int> map_sighash_values = {