aboutsummaryrefslogtreecommitdiff
path: root/src/core_write.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core_write.cpp')
-rw-r--r--src/core_write.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core_write.cpp b/src/core_write.cpp
index a2be17d1aa..63f2c36b5a 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -140,14 +140,10 @@ std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDeco
return str;
}
-std::string EncodeHexTx(const CTransaction& tx, const bool without_witness)
+std::string EncodeHexTx(const CTransaction& tx)
{
DataStream ssTx;
- if (without_witness) {
- ssTx << TX_NO_WITNESS(tx);
- } else {
- ssTx << TX_WITH_WITNESS(tx);
- }
+ ssTx << TX_WITH_WITNESS(tx);
return HexStr(ssTx);
}
@@ -172,7 +168,7 @@ void ScriptToUniv(const CScript& script, UniValue& out, bool include_hex, bool i
out.pushKV("type", GetTxnOutputType(type));
}
-void TxToUniv(const CTransaction& tx, const uint256& block_hash, UniValue& entry, bool include_hex, bool without_witness, const CTxUndo* txundo, TxVerbosity verbosity)
+void TxToUniv(const CTransaction& tx, const uint256& block_hash, UniValue& entry, bool include_hex, const CTxUndo* txundo, TxVerbosity verbosity)
{
CHECK_NONFATAL(verbosity >= TxVerbosity::SHOW_DETAILS);
@@ -268,6 +264,6 @@ void TxToUniv(const CTransaction& tx, const uint256& block_hash, UniValue& entry
}
if (include_hex) {
- entry.pushKV("hex", EncodeHexTx(tx, without_witness)); // The hex-encoded transaction. Used the name "hex" to be consistent with the verbose output of "getrawtransaction".
+ entry.pushKV("hex", EncodeHexTx(tx)); // The hex-encoded transaction. Used the name "hex" to be consistent with the verbose output of "getrawtransaction".
}
}