Skip to content

Commit 09391a6

Browse files
authored
Merge pull request #1971 from cyrossignol/rpc-tx-size
rpc: Add transaction size to RPC output
2 parents c29efb6 + 6c664ac commit 09391a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rpcrawtransaction.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
287287
{
288288
entry.pushKV("txid", tx.GetHash().GetHex());
289289
entry.pushKV("version", tx.nVersion);
290+
entry.pushKV("size", (int)::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION));
290291
entry.pushKV("time", (int)tx.nTime);
291292
entry.pushKV("locktime", (int)tx.nLockTime);
292293
entry.pushKV("hashboinc", tx.hashBoinc);

0 commit comments

Comments
 (0)