kernel: Split ParseSighashString

This split is done in preparation for the next commit where the
dependency on UniValue in the kernel library is removed.
This commit is contained in:
TheCharlatan
2023-07-21 13:47:43 +02:00
parent 4a1aae6749
commit 10eb3a9faa
6 changed files with 47 additions and 22 deletions

View File

@@ -6,6 +6,7 @@
#define BITCOIN_CORE_IO_H
#include <consensus/amount.h>
#include <util/result.h>
#include <string>
#include <vector>
@@ -46,7 +47,7 @@ bool DecodeHexBlockHeader(CBlockHeader&, const std::string& hex_header);
*/
bool ParseHashStr(const std::string& strHex, uint256& result);
std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
int ParseSighashString(const UniValue& sighash);
[[nodiscard]] util::Result<int> SighashFromStr(const std::string& sighash);
// core_write.cpp
UniValue ValueFromAmount(const CAmount amount);