aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-tx.cpp
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-07-21 14:37:03 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-07-25 17:40:07 +0200
commit6960c81cbfa6208d4098353e53b313e13a21cb49 (patch)
treeff176ff287825a64169c92cbb3d73d5eaa3929e7 /src/bitcoin-tx.cpp
parent10eb3a9faa977371facacee937b2e6dc26f008e0 (diff)
downloadbitcoin-6960c81cbfa6208d4098353e53b313e13a21cb49.tar.xz
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.
Diffstat (limited to 'src/bitcoin-tx.cpp')
-rw-r--r--src/bitcoin-tx.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 0c25ddf373..103d8885db 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -562,6 +562,16 @@ static CAmount AmountFromValue(const UniValue& value)
return amount;
}
+static 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);
+}
+
static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
{
int nHashType = SIGHASH_ALL;