Skip to content

Commit 7a19efe

Browse files
committed
Formatting, spelling, comment fixes.
1 parent 9fa53dd commit 7a19efe

File tree

6 files changed

+23
-18
lines changed

6 files changed

+23
-18
lines changed

doc/release-notes.md

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

src/main.cpp

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

853853
LOCK(csLimiter);
854854

855-
// Use an exponentially decaying ~10-minute window:
856855
dCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
857856
nLastTime = nNow;
858857
if (dCount >= nLimit*10*1000)
@@ -973,7 +972,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
973972
static int64_t nLastFreeTime;
974973
static int64_t nFreeLimit = GetArg("-limitfreerelay", 15);
975974

976-
if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
975+
if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
977976
return state.DoS(0, error("AcceptToMemoryPool : free transaction rejected by rate limiter"),
978977
REJECT_INSUFFICIENTFEE, "insufficient priority");
979978

@@ -1000,8 +999,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
1000999
return true;
10011000
}
10021001

1003-
static void
1004-
RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
1002+
static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
10051003
{
10061004
// Relaying double-spend attempts to our peers lets them detect when
10071005
// somebody might be trying to cheat them. However, blindly relaying

src/qt/transactionrecord.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@ class TransactionStatus
1919
{
2020
public:
2121
TransactionStatus():
22-
countsForBalance(false), sortKey(""),
23-
matures_in(0), status(Offline), hasConflicting(false), depth(0), open_for(0), cur_num_blocks(-1),
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),
2430
cur_num_conflicts(-1)
25-
{ }
31+
{
32+
}
2633

2734
enum Status {
2835
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
@@ -538,9 +538,9 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
538538
case Qt::TextAlignmentRole:
539539
return column_alignments[index.column()];
540540
case Qt::BackgroundColorRole:
541-
if (rec->status.hasConflicting)
541+
if (rec->status.hasConflicting)
542542
return COLOR_HASCONFLICTING_BG;
543-
break;
543+
break;
544544
case Qt::ForegroundRole:
545545
if (rec->status.hasConflicting)
546546
return COLOR_HASCONFLICTING;

src/qt/walletmodel.cpp

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

139139
void WalletModel::updateTransaction(const QString &hash, int status)
140140
{
141-
if (status == CT_GOT_CONFLICT)
142-
{
143-
emit message(tr("Conflict Received"),
144-
tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
145-
CClientUIInterface::MSG_WARNING);
146-
return;
147-
}
141+
if (status == CT_GOT_CONFLICT)
142+
{
143+
emit message(tr("Conflict Received"),
144+
tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
145+
CClientUIInterface::MSG_WARNING);
146+
return;
147+
}
148148

149149
if(transactionTableModel)
150150
transactionTableModel->updateTransaction(hash, status);

src/wallet.cpp

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

638638
bool fIsConflicting = IsConflicting(tx);
639639
if (fIsConflicting)
640-
nConflictsReceived++;
640+
nConflictsReceived++;
641641

642642
if (fExisted || IsMine(tx) || IsFromMe(tx) || fIsConflicting)
643643
{

0 commit comments

Comments
 (0)