From bde280b9a4da2652716c8ffdeed9ebfa4461cc70 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 21 Dec 2011 22:33:19 +0100 Subject: Revert "Use standard C99 (and Qt) types for 64-bit integers" This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9. --- src/qt/transactionrecord.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/qt/transactionrecord.cpp') diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 8a1f1b6772..53cd35b2da 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -1,5 +1,3 @@ -#include - #include "transactionrecord.h" #include "headers.h" @@ -35,10 +33,10 @@ bool TransactionRecord::showTransaction(const CWalletTx &wtx) QList TransactionRecord::decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx) { QList parts; - qint64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime(); - qint64 nCredit = wtx.GetCredit(true); - qint64 nDebit = wtx.GetDebit(); - qint64 nNet = nCredit - nDebit; + int64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime(); + int64 nCredit = wtx.GetCredit(true); + int64 nDebit = wtx.GetDebit(); + int64 nNet = nCredit - nDebit; uint256 hash = wtx.GetHash(); std::map mapValue = wtx.mapValue; @@ -60,7 +58,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * if (nCredit == 0) { - qint64 nUnmatured = 0; + int64 nUnmatured = 0; BOOST_FOREACH(const CTxOut& txout, wtx.vout) nUnmatured += wallet->GetCredit(txout); sub.credit = nUnmatured; @@ -105,7 +103,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * if (fAllFromMe && fAllToMe) { // Payment to self - qint64 nChange = wtx.GetChange(); + int64 nChange = wtx.GetChange(); parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "", -(nDebit - nChange), nCredit - nChange)); @@ -115,7 +113,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * // // Debit // - qint64 nTxFee = nDebit - wtx.GetValueOut(); + int64 nTxFee = nDebit - wtx.GetValueOut(); for (int nOut = 0; nOut < wtx.vout.size(); nOut++) { @@ -146,7 +144,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * } } - qint64 nValue = txout.nValue; + int64 nValue = txout.nValue; /* Add fee to first output */ if (nTxFee > 0) { @@ -229,7 +227,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) // For generated transactions, determine maturity if(type == TransactionRecord::Generated) { - qint64 nCredit = wtx.GetCredit(true); + int64 nCredit = wtx.GetCredit(true); if (nCredit == 0) { status.maturity = TransactionStatus::Immature; -- cgit v1.2.3