Auto merge of #2001 - bitcartel:1957_add_size_to_listtransactions, r=ebfull

Closes #1957 by adding tx serialization size to listtransactions output.
This commit is contained in:
zkbot 2017-01-18 07:15:35 +00:00
commit 4d52160de3
1 changed files with 3 additions and 0 deletions

View File

@ -1325,6 +1325,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
entry.push_back(Pair("fee", ValueFromAmount(-nFee)));
if (fLong)
WalletTxToJSON(wtx, entry);
entry.push_back(Pair("size", static_cast<CTransaction>(wtx).GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION)));
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));
if (fLong)
WalletTxToJSON(wtx, entry);
entry.push_back(Pair("size", static_cast<CTransaction>(wtx).GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION)));
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"
" from (for receiving funds, positive amounts), or went to (for sending funds,\n"
" negative amounts).\n"
" \"size\": n, (numeric) Transaction size in bytes\n"
" }\n"
"]\n"