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.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 3a2bf865fc..253dfde100 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -174,9 +174,7 @@ void TxToUniv(const CTransaction& tx, const uint256& block_hash, UniValue& entry
entry.pushKV("txid", tx.GetHash().GetHex());
entry.pushKV("hash", tx.GetWitnessHash().GetHex());
- // Transaction version is actually unsigned in consensus checks, just signed in memory,
- // so cast to unsigned before giving it to the user.
- entry.pushKV("version", static_cast<int64_t>(static_cast<uint32_t>(tx.nVersion)));
+ entry.pushKV("version", tx.version);
entry.pushKV("size", tx.GetTotalSize());
entry.pushKV("vsize", (GetTransactionWeight(tx) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR);
entry.pushKV("weight", GetTransactionWeight(tx));