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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core_write.cpp b/src/core_write.cpp
index a3ca87c8b5..d116e617ee 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -151,6 +151,8 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry)
entry.pushKV("txid", tx.GetHash().GetHex());
entry.pushKV("hash", tx.GetWitnessHash().GetHex());
entry.pushKV("version", tx.nVersion);
+ entry.pushKV("size", (int)::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION));
+ entry.pushKV("vsize", (GetTransactionWeight(tx) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR);
entry.pushKV("locktime", (int64_t)tx.nLockTime);
UniValue vin(UniValue::VARR);