Skip to content

Commit ad26dc9

Browse files
committed
Revert "Formatting, spelling, comment fixes."
This reverts commit 7a19efe.
1 parent cd057bf commit ad26dc9

File tree

6 files changed

+18
-23
lines changed

6 files changed

+18
-23
lines changed

doc/release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ Warning
8383
- Using other relay rules, a double-spender can craft his crime to
8484
resist broadcast
8585
- Miners can choose which conflicting spend to confirm, and some
86-
miners may not confirm the first acceptable spend they see
86+
miners may not confirmg the first acceptable spend they see
8787

src/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,7 @@ bool RateLimitExceeded(double& dCount, int64_t& nLastTime, int64_t nLimit, unsig
898898

899899
LOCK(csLimiter);
900900

901+
// Use an exponentially decaying ~10-minute window:
901902
dCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
902903
nLastTime = nNow;
903904
if (dCount >= nLimit*10*1000)
@@ -1018,7 +1019,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
10181019
static int64_t nLastFreeTime;
10191020
static int64_t nFreeLimit = GetArg("-limitfreerelay", 15);
10201021

1021-
if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
1022+
if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
10221023
return state.DoS(0, error("AcceptToMemoryPool : free transaction rejected by rate limiter"),
10231024
REJECT_INSUFFICIENTFEE, "insufficient priority");
10241025

@@ -1045,7 +1046,8 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
10451046
return true;
10461047
}
10471048

1048-
static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
1049+
static void
1050+
RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
10491051
{
10501052
// Relaying double-spend attempts to our peers lets them detect when
10511053
// somebody might be trying to cheat them. However, blindly relaying

src/qt/transactionrecord.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,10 @@ class TransactionStatus
1919
{
2020
public:
2121
TransactionStatus():
22-
countsForBalance(false),
23-
sortKey(""),
24-
matures_in(0),
25-
status(Offline),
26-
hasConflicting(false),
27-
depth(0),
28-
open_for(0),
29-
cur_num_blocks(-1),
22+
countsForBalance(false), sortKey(""),
23+
matures_in(0), status(Offline), hasConflicting(false), depth(0), open_for(0), cur_num_blocks(-1),
3024
cur_num_conflicts(-1)
31-
{
32-
}
25+
{ }
3326

3427
enum Status {
3528
Confirmed, /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/

src/qt/transactiontablemodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
546546
case Qt::TextAlignmentRole:
547547
return column_alignments[index.column()];
548548
case Qt::BackgroundColorRole:
549-
if (rec->status.hasConflicting)
549+
if (rec->status.hasConflicting)
550550
return COLOR_HASCONFLICTING_BG;
551-
break;
551+
break;
552552
case Qt::ForegroundRole:
553553
if (rec->status.hasConflicting)
554554
return COLOR_HASCONFLICTING;

src/qt/walletmodel.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ void WalletModel::checkBalanceChanged()
164164

165165
void WalletModel::updateTransaction(const QString &hash, int status)
166166
{
167-
if (status == CT_GOT_CONFLICT)
168-
{
169-
emit message(tr("Conflict Received"),
170-
tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
171-
CClientUIInterface::MSG_WARNING);
172-
return;
173-
}
167+
if (status == CT_GOT_CONFLICT)
168+
{
169+
emit message(tr("Conflict Received"),
170+
tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
171+
CClientUIInterface::MSG_WARNING);
172+
return;
173+
}
174174

175175
if(transactionTableModel)
176176
transactionTableModel->updateTransaction(hash, status);

src/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
657657

658658
bool fIsConflicting = IsConflicting(tx);
659659
if (fIsConflicting)
660-
nConflictsReceived++;
660+
nConflictsReceived++;
661661

662662
if (fExisted || IsMine(tx) || IsFromMe(tx) || fIsConflicting)
663663
{

0 commit comments

Comments
 (0)