Refactor: move GetValueIn(tx) to tx.GetValueIn()

GetValueIn makes more sense as a CTransaction member.
This commit is contained in:
Gavin Andresen
2013-11-11 16:03:51 +10:00
parent 98c7c8fd1d
commit 0733c1bde6
10 changed files with 33 additions and 36 deletions

View File

@@ -194,7 +194,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, nValue) + "<br>";
}
int64_t nTxFee = nDebit - GetValueOut(wtx);
int64_t nTxFee = nDebit - wtx.GetValueOut();
if (nTxFee > 0)
strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -nTxFee) + "<br>";
}

View File

@@ -95,7 +95,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
//
// Debit
//
int64_t nTxFee = nDebit - GetValueOut(wtx);
int64_t nTxFee = nDebit - wtx.GetValueOut();
for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++)
{