diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -611,7 +611,7 @@ throw std::runtime_error("prevtxs internal object typecheck fail"); } - TxId txid(ParseHashUV(prevOut["txid"], "txid")); + TxId txid(ParseHashStr(prevOut["txid"].get_str(), "txid")); int nOut = atoi(prevOut["vout"].getValStr()); if (nOut < 0) { diff --git a/src/core_io.h b/src/core_io.h --- a/src/core_io.h +++ b/src/core_io.h @@ -24,7 +24,6 @@ bool DecodeHexTx(CMutableTransaction &tx, const std::string &strHexTx); bool DecodeHexBlk(CBlock &, const std::string &strHexBlk); bool DecodeHexBlockHeader(CBlockHeader &, const std::string &hex_header); -uint256 ParseHashUV(const UniValue &v, const std::string &strName); uint256 ParseHashStr(const std::string &, const std::string &strName); std::vector ParseHexUV(const UniValue &v, const std::string &strName); diff --git a/src/core_read.cpp b/src/core_read.cpp --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -230,16 +230,6 @@ return true; } -uint256 ParseHashUV(const UniValue &v, const std::string &strName) { - std::string strHex; - if (v.isStr()) { - strHex = v.getValStr(); - } - - // Note: ParseHashStr("") throws a runtime_error - return ParseHashStr(strHex, strName); -} - uint256 ParseHashStr(const std::string &strHex, const std::string &strName) { if (!IsHex(strHex)) { // Note: IsHex("") is false