aboutsummaryrefslogtreecommitdiff
path: root/src/core_io.h
diff options
context:
space:
mode:
authorfyquah <fyquah@protonmail.com>2021-02-27 17:39:09 +0000
committerKiminuo <kiminuo@protonmail.com>2021-10-05 10:42:34 +0200
commit51dbc167e98daab317baa80cf80bfda337672dab (patch)
tree69957736fc65466b945e0fedd9a9527f30f4bb02 /src/core_io.h
parent3cc95345ca49b87e8caca9a0e6418c63ae1e463a (diff)
rpc: Add level 3 verbosity to getblock RPC call.
Display the prevout in transaction inputs when calling getblock level 3 verbosity. Co-authored-by: Luke Dashjr <luke_github1@dashjr.org> Co-authored-by: 0xB10C <19157360+0xB10C@users.noreply.github.com>
Diffstat (limited to 'src/core_io.h')
-rw-r--r--src/core_io.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core_io.h b/src/core_io.h
index b545d0b59e..4d7199ab12 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -25,7 +25,8 @@ class CTxUndo;
*/
enum class TxVerbosity {
SHOW_TXID, //!< Only TXID for each block's transaction
- SHOW_DETAILS //!< Include TXID, inputs, outputs, and other common block's transaction information
+ SHOW_DETAILS, //!< Include TXID, inputs, outputs, and other common block's transaction information
+ SHOW_DETAILS_AND_PREVOUT //!< The same as previous option with information about prevouts if available
};
// core_read.cpp
@@ -54,6 +55,6 @@ std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
std::string SighashToStr(unsigned char sighash_type);
void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool include_hex, bool include_address = true);
void ScriptToUniv(const CScript& script, UniValue& out);
-void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, bool include_hex = true, int serialize_flags = 0, const CTxUndo* txundo = nullptr);
+void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, bool include_hex = true, int serialize_flags = 0, const CTxUndo* txundo = nullptr, TxVerbosity verbosity = TxVerbosity::SHOW_DETAILS);
#endif // BITCOIN_CORE_IO_H