mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 05:49:11 +01:00
1c002dd1b6
abd2678ac1 Drop ParseHashUV in favor of calling ParseHashStr (Ben Woosley) Pull request description: The one existing call already validates `get_str` will pass via `checkObject`: https://github.com/bitcoin/bitcoin/pull/13422/files#diff-8fe4d6985ee4acf8bfc1ed8db1e83cb5L586 Split from #13420 Tree-SHA512: 35dfa8c28d0c3ceac7a6de7f4eb4a44d912f4c31f5d21c9438f899566ca2b34851f1a58c3417355e55d0c33abb97385f4a47e034bfc8e3cdbbf5f73813ca0582
38 lines
1.3 KiB
C++
38 lines
1.3 KiB
C++
// Copyright (c) 2009-2015 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_CORE_IO_H
|
|
#define BITCOIN_CORE_IO_H
|
|
|
|
#include <amount.h>
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class CBlock;
|
|
class CScript;
|
|
class CTransaction;
|
|
struct CMutableTransaction;
|
|
class uint256;
|
|
class UniValue;
|
|
|
|
struct CSpentIndexTxInfo;
|
|
|
|
// core_read.cpp
|
|
CScript ParseScript(const std::string& s);
|
|
std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false);
|
|
bool DecodeHexTx(CMutableTransaction& tx, const std::string& strHexTx);
|
|
bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
|
|
uint256 ParseHashStr(const std::string&, const std::string& strName);
|
|
std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
|
|
|
|
// core_write.cpp
|
|
UniValue ValueFromAmount(const CAmount& amount);
|
|
std::string FormatScript(const CScript& script);
|
|
std::string EncodeHexTx(const CTransaction& tx);
|
|
void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
|
|
void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, bool include_hex = true, const CSpentIndexTxInfo* ptxSpentInfo = nullptr);
|
|
|
|
#endif // BITCOIN_CORE_IO_H
|