Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionrecord.cpp
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
Lint: Code style violation: '/Users/shammah/repos/bitcoin-abc/src/qt/transactionrecord.cpp' has code style errors. | |||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "transactionrecord.h" | #include "transactionrecord.h" | ||||
#include "base58.h" | #include "base58.h" | ||||
#include "consensus/consensus.h" | #include "consensus/consensus.h" | ||||
#include "timedata.h" | #include "timedata.h" | ||||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | if (nNet > 0 || wtx.IsCoinBase()) { | ||||
} | } | ||||
if (fAllFromMe && fAllToMe) { | if (fAllFromMe && fAllToMe) { | ||||
// Payment to self | // Payment to self | ||||
CAmount nChange = wtx.GetChange(); | CAmount nChange = wtx.GetChange(); | ||||
parts.append( | parts.append( | ||||
TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, | TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, | ||||
"", -(nDebit - nChange), nCredit - nChange)); | "", -1 * (nDebit - nChange), nCredit - nChange)); | ||||
// maybe pass to TransactionRecord as constructor argument | // maybe pass to TransactionRecord as constructor argument | ||||
parts.last().involvesWatchAddress = involvesWatchAddress; | parts.last().involvesWatchAddress = involvesWatchAddress; | ||||
} else if (fAllFromMe) { | } else if (fAllFromMe) { | ||||
// | // | ||||
// Debit | // Debit | ||||
// | // | ||||
CAmount nTxFee = nDebit - wtx.tx->GetValueOut(); | CAmount nTxFee = nDebit - wtx.tx->GetValueOut(); | ||||
Show All 21 Lines | if (nNet > 0 || wtx.IsCoinBase()) { | ||||
} | } | ||||
CAmount nValue = txout.nValue; | CAmount nValue = txout.nValue; | ||||
/* Add fee to first output */ | /* Add fee to first output */ | ||||
if (nTxFee > 0) { | if (nTxFee > 0) { | ||||
nValue += nTxFee; | nValue += nTxFee; | ||||
nTxFee = 0; | nTxFee = 0; | ||||
} | } | ||||
sub.debit = -nValue; | sub.debit = -1 * nValue; | ||||
parts.append(sub); | parts.append(sub); | ||||
} | } | ||||
} else { | } else { | ||||
// | // | ||||
// Mixed debit transaction, can't break down payees | // Mixed debit transaction, can't break down payees | ||||
// | // | ||||
parts.append(TransactionRecord( | parts.append(TransactionRecord( | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |
'/Users/shammah/repos/bitcoin-abc/src/qt/transactionrecord.cpp' has code style errors.