Merge 143ace65db into merged_master (Bitcoin PR bitcoin/bitcoin#28890)

This commit is contained in:
Byron Hambly 2025-11-17 21:33:39 +02:00
commit a264d5785d
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
15 changed files with 22 additions and 82 deletions

View file

@ -169,14 +169,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);
}
@ -228,7 +224,7 @@ void ScriptToUniv(const CScript& script, UniValue& out, bool include_hex, bool i
}
}
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);
@ -426,6 +422,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".
}
}