Closes #1957 by adding tx serialization size to listtransactions output.
This commit is contained in:
@@ -1325,6 +1325,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
|
|||||||
entry.push_back(Pair("fee", ValueFromAmount(-nFee)));
|
entry.push_back(Pair("fee", ValueFromAmount(-nFee)));
|
||||||
if (fLong)
|
if (fLong)
|
||||||
WalletTxToJSON(wtx, entry);
|
WalletTxToJSON(wtx, entry);
|
||||||
|
entry.push_back(Pair("size", static_cast<CTransaction>(wtx).GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION)));
|
||||||
ret.push_back(entry);
|
ret.push_back(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1361,6 +1362,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
|
|||||||
entry.push_back(Pair("vout", r.vout));
|
entry.push_back(Pair("vout", r.vout));
|
||||||
if (fLong)
|
if (fLong)
|
||||||
WalletTxToJSON(wtx, entry);
|
WalletTxToJSON(wtx, entry);
|
||||||
|
entry.push_back(Pair("size", static_cast<CTransaction>(wtx).GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION)));
|
||||||
ret.push_back(entry);
|
ret.push_back(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1429,6 +1431,7 @@ Value listtransactions(const Array& params, bool fHelp)
|
|||||||
" \"otheraccount\": \"accountname\", (string) For the 'move' category of transactions, the account the funds came \n"
|
" \"otheraccount\": \"accountname\", (string) For the 'move' category of transactions, the account the funds came \n"
|
||||||
" from (for receiving funds, positive amounts), or went to (for sending funds,\n"
|
" from (for receiving funds, positive amounts), or went to (for sending funds,\n"
|
||||||
" negative amounts).\n"
|
" negative amounts).\n"
|
||||||
|
" \"size\": n, (numeric) Transaction size in bytes\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"]\n"
|
"]\n"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user