aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/addrman.cpp5
-rw-r--r--src/arith_uint256.h2
-rw-r--r--src/bitcoind.cpp2
-rw-r--r--src/chainparams.cpp10
-rw-r--r--src/consensus/params.h6
-rw-r--r--src/init.cpp6
-rw-r--r--src/main.cpp43
-rw-r--r--src/miner.h2
-rw-r--r--src/qt/bitcoin.cpp1
-rw-r--r--src/qt/bitcoingui.cpp2
-rw-r--r--src/qt/coincontroldialog.cpp2
-rw-r--r--src/qt/forms/sendcoinsentry.ui8
-rw-r--r--src/qt/guiutil.cpp10
-rw-r--r--src/qt/recentrequeststablemodel.cpp3
-rw-r--r--src/qt/sendcoinsdialog.cpp4
-rw-r--r--src/qt/sendcoinsentry.cpp12
-rw-r--r--src/qt/splashscreen.cpp5
-rw-r--r--src/qt/transactiondesc.cpp1
-rw-r--r--src/qt/walletmodel.cpp1
-rw-r--r--src/rpcrawtransaction.cpp2
-rw-r--r--src/support/allocators/secure.h6
-rw-r--r--src/support/allocators/zeroafterfree.h6
-rw-r--r--src/support/pagelocker.h6
-rw-r--r--src/sync.h23
-rw-r--r--src/wallet/crypter.h6
-rw-r--r--src/wallet/db.h6
-rw-r--r--src/wallet/wallet.cpp2
-rw-r--r--src/wallet/wallet.h6
-rw-r--r--src/wallet/wallet_ismine.h6
-rw-r--r--src/wallet/walletdb.h6
30 files changed, 97 insertions, 103 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 5d9527f0e1..094c913e9c 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -67,9 +67,8 @@ double CAddrInfo::GetChance(int64_t nNow) const
if (nSinceLastTry < 60 * 10)
fChance *= 0.01;
- // deprioritize 50% after each failed attempt
- for (int n = 0; n < nAttempts; n++)
- fChance /= 1.5;
+ // deprioritize 66% after each failed attempt, but at most 1/28th to avoid the search taking forever or overly penalizing outages.
+ fChance *= pow(0.66, min(nAttempts, 8));
return fChance;
}
diff --git a/src/arith_uint256.h b/src/arith_uint256.h
index b6ba3a1087..103c78bb8e 100644
--- a/src/arith_uint256.h
+++ b/src/arith_uint256.h
@@ -287,4 +287,4 @@ public:
uint256 ArithToUint256(const arith_uint256 &);
arith_uint256 UintToArith256(const uint256 &);
-#endif // BITCOIN_UINT256_H
+#endif // BITCOIN_ARITH_UINT256_H
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index a0a96c2dfa..2172f4a21b 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -21,7 +21,7 @@
*
* \section intro_sec Introduction
*
- * This is the developer documentation of the reference client for an experimental new digital currency called Bitcoin (http://www.bitcoin.org/),
+ * This is the developer documentation of the reference client for an experimental new digital currency called Bitcoin (https://www.bitcoin.org/),
* which enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate
* with no central authority: managing transactions and issuing money are carried out collectively by the network.
*
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 97312b366d..2d4fde2476 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -151,11 +151,11 @@ public:
assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
- vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be"));
- vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me"));
- vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org"));
- vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com"));
- vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org"));
+ vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be")); // Pieter Wuille
+ vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo
+ vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr
+ vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Addy Yeow
+ vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
diff --git a/src/consensus/params.h b/src/consensus/params.h
index 35d447b712..c480a1cce1 100644
--- a/src/consensus/params.h
+++ b/src/consensus/params.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_CONSENSUS_CONSENSUS_PARAMS_H
-#define BITCOIN_CONSENSUS_CONSENSUS_PARAMS_H
+#ifndef BITCOIN_CONSENSUS_PARAMS_H
+#define BITCOIN_CONSENSUS_PARAMS_H
#include "uint256.h"
@@ -28,4 +28,4 @@ struct Params {
};
} // namespace Consensus
-#endif // BITCOIN_CONSENSUS_CONSENSUS_PARAMS_H
+#endif // BITCOIN_CONSENSUS_PARAMS_H
diff --git a/src/init.cpp b/src/init.cpp
index 8f52d254f4..665aebe1c5 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -123,7 +123,7 @@ public:
LogPrintf("Error reading from database: %s\n", e.what());
// Starting the shutdown sequence and returning false to the caller would be
// interpreted as 'entry not found' (as opposed to unable to read data), and
- // could lead to invalid interpration. Just exit immediately, as we can't
+ // could lead to invalid interpretation. Just exit immediately, as we can't
// continue anyway, and all writes should be atomic.
abort();
}
@@ -366,8 +366,8 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), 1));
if (GetBoolArg("-help-debug", false))
{
- strUsage += HelpMessageOpt("-limitfreerelay=<n>", strprintf(_("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:%u)"), 15));
- strUsage += HelpMessageOpt("-relaypriority", strprintf(_("Require high priority for relaying free or low-fee transactions (default:%u)"), 1));
+ strUsage += HelpMessageOpt("-limitfreerelay=<n>", strprintf(_("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default: %u)"), 15));
+ strUsage += HelpMessageOpt("-relaypriority", strprintf(_("Require high priority for relaying free or low-fee transactions (default: %u)"), 1));
strUsage += HelpMessageOpt("-maxsigcachesize=<n>", strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000));
}
strUsage += HelpMessageOpt("-minrelaytxfee=<amt>", strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())));
diff --git a/src/main.cpp b/src/main.cpp
index 8dd61a3720..4352c719a1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1233,14 +1233,14 @@ void CheckForkWarningConditions()
}
if (pindexBestForkTip && pindexBestForkBase)
{
- LogPrintf("CheckForkWarningConditions: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n",
+ LogPrintf("%s: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n", __func__,
pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(),
pindexBestForkTip->nHeight, pindexBestForkTip->phashBlock->ToString());
fLargeWorkForkFound = true;
}
else
{
- LogPrintf("CheckForkWarningConditions: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n");
+ LogPrintf("%s: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n", __func__);
fLargeWorkInvalidChainFound = true;
}
}
@@ -1298,10 +1298,10 @@ void Misbehaving(NodeId pnode, int howmuch)
int banscore = GetArg("-banscore", 100);
if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore)
{
- LogPrintf("Misbehaving: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n", state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
+ LogPrintf("%s: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n", __func__, state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
state->fShouldBan = true;
} else
- LogPrintf("Misbehaving: %s (%d -> %d)\n", state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
+ LogPrintf("%s: %s (%d -> %d)\n", __func__, state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
}
void static InvalidChainFound(CBlockIndex* pindexNew)
@@ -1309,11 +1309,11 @@ void static InvalidChainFound(CBlockIndex* pindexNew)
if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
pindexBestInvalid = pindexNew;
- LogPrintf("InvalidChainFound: invalid block=%s height=%d log2_work=%.8g date=%s\n",
+ LogPrintf("%s: invalid block=%s height=%d log2_work=%.8g date=%s\n", __func__,
pindexNew->GetBlockHash().ToString(), pindexNew->nHeight,
log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S",
pindexNew->GetBlockTime()));
- LogPrintf("InvalidChainFound: current best=%s height=%d log2_work=%.8g date=%s\n",
+ LogPrintf("%s: current best=%s height=%d log2_work=%.8g date=%s\n", __func__,
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0),
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()));
CheckForkWarningConditions();
@@ -1921,7 +1921,7 @@ void static UpdateTip(CBlockIndex *pindexNew) {
nTimeBestReceived = GetTime();
mempool.AddTransactionsUpdated(1);
- LogPrintf("UpdateTip: new best=%s height=%d log2_work=%.8g tx=%lu date=%s progress=%f cache=%u\n",
+ LogPrintf("%s: new best=%s height=%d log2_work=%.8g tx=%lu date=%s progress=%f cache=%u\n", __func__,
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), (unsigned long)chainActive.Tip()->nChainTx,
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
Checkpoints::GuessVerificationProgress(chainActive.Tip()), (unsigned int)pcoinsTip->GetCacheSize());
@@ -1941,7 +1941,7 @@ void static UpdateTip(CBlockIndex *pindexNew) {
pindex = pindex->pprev;
}
if (nUpgraded > 0)
- LogPrintf("SetBestChain: %d of last 100 blocks above version %d\n", nUpgraded, (int)CBlock::CURRENT_VERSION);
+ LogPrintf("%s: %d of last 100 blocks above version %d\n", __func__, nUpgraded, (int)CBlock::CURRENT_VERSION);
if (nUpgraded > 100/2)
{
// strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
@@ -2350,10 +2350,6 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
pindexNew->nUndoPos = 0;
pindexNew->nStatus |= BLOCK_HAVE_DATA;
pindexNew->RaiseValidity(BLOCK_VALID_TRANSACTIONS);
- {
- LOCK(cs_nBlockSequenceId);
- pindexNew->nSequenceId = nBlockSequenceId++;
- }
setDirtyBlockIndex.insert(pindexNew);
if (pindexNew->pprev == NULL || pindexNew->pprev->nChainTx) {
@@ -2366,6 +2362,10 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
CBlockIndex *pindex = queue.front();
queue.pop_front();
pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
+ {
+ LOCK(cs_nBlockSequenceId);
+ pindex->nSequenceId = nBlockSequenceId++;
+ }
if (chainActive.Tip() == NULL || !setBlockIndexCandidates.value_comp()(pindex, chainActive.Tip())) {
setBlockIndexCandidates.insert(pindex);
}
@@ -2936,7 +2936,7 @@ bool static LoadBlockIndexDB()
// Check whether we have a transaction index
pblocktree->ReadFlag("txindex", fTxIndex);
- LogPrintf("LoadBlockIndexDB(): transaction index %s\n", fTxIndex ? "enabled" : "disabled");
+ LogPrintf("%s: transaction index %s\n", __func__, fTxIndex ? "enabled" : "disabled");
// Load pointer to end of best chain
BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
@@ -2946,7 +2946,7 @@ bool static LoadBlockIndexDB()
PruneBlockIndexCandidates();
- LogPrintf("LoadBlockIndexDB(): hashBestChain=%s height=%d date=%s progress=%f\n",
+ LogPrintf("%s: hashBestChain=%s height=%d date=%s progress=%f\n", __func__,
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(),
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
Checkpoints::GuessVerificationProgress(chainActive.Tip()));
@@ -3282,6 +3282,7 @@ void static CheckBlockIndex()
// HAVE_DATA is equivalent to VALID_TRANSACTIONS and equivalent to nTx > 0 (we stored the number of transactions in the block)
assert(!(pindex->nStatus & BLOCK_HAVE_DATA) == (pindex->nTx == 0));
assert(((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_TRANSACTIONS) == (pindex->nTx > 0));
+ if (pindex->nChainTx == 0) assert(pindex->nSequenceId == 0); // nSequenceId can't be set for blocks that aren't linked
// All parents having data is equivalent to all parents being VALID_TRANSACTIONS, which is equivalent to nChainTx being set.
assert((pindexFirstMissing != NULL) == (pindex->nChainTx == 0)); // nChainTx == 0 is used to signal that all parent block's transaction data is available.
assert((pindexFirstNotTransactionsValid != NULL) == (pindex->nChainTx == 0));
@@ -3492,7 +3493,7 @@ void static ProcessGetData(CNode* pfrom)
send = mi->second->IsValid(BLOCK_VALID_SCRIPTS) && (pindexBestHeader != NULL) &&
(mi->second->GetBlockTime() > pindexBestHeader->GetBlockTime() - 30 * 24 * 60 * 60);
if (!send) {
- LogPrintf("ProcessGetData(): ignoring request from peer=%i for old block that isn't in the main chain\n", pfrom->GetId());
+ LogPrintf("%s: ignoring request from peer=%i for old block that isn't in the main chain\n", __func__, pfrom->GetId());
}
}
}
@@ -4394,7 +4395,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
bool ProcessMessages(CNode* pfrom)
{
//if (fDebug)
- // LogPrintf("ProcessMessages(%u messages)\n", pfrom->vRecvMsg.size());
+ // LogPrintf("%s(%u messages)\n", __func__, pfrom->vRecvMsg.size());
//
// Message format
@@ -4422,7 +4423,7 @@ bool ProcessMessages(CNode* pfrom)
CNetMessage& msg = *it;
//if (fDebug)
- // LogPrintf("ProcessMessages(message %u msgsz, %u bytes, complete:%s)\n",
+ // LogPrintf("%s(message %u msgsz, %u bytes, complete:%s)\n", __func__,
// msg.hdr.nMessageSize, msg.vRecv.size(),
// msg.complete() ? "Y" : "N");
@@ -4458,7 +4459,7 @@ bool ProcessMessages(CNode* pfrom)
unsigned int nChecksum = ReadLE32((unsigned char*)&hash);
if (nChecksum != hdr.nChecksum)
{
- LogPrintf("ProcessMessages(%s, %u bytes): CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n",
+ LogPrintf("%s(%s, %u bytes): CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n", __func__,
SanitizeString(strCommand), nMessageSize, nChecksum, hdr.nChecksum);
continue;
}
@@ -4476,12 +4477,12 @@ bool ProcessMessages(CNode* pfrom)
if (strstr(e.what(), "end of data"))
{
// Allow exceptions from under-length message on vRecv
- LogPrintf("ProcessMessages(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", SanitizeString(strCommand), nMessageSize, e.what());
+ LogPrintf("%s(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
}
else if (strstr(e.what(), "size too large"))
{
// Allow exceptions from over-long size
- LogPrintf("ProcessMessages(%s, %u bytes): Exception '%s' caught\n", SanitizeString(strCommand), nMessageSize, e.what());
+ LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
}
else
{
@@ -4498,7 +4499,7 @@ bool ProcessMessages(CNode* pfrom)
}
if (!fRet)
- LogPrintf("ProcessMessage(%s, %u bytes) FAILED peer=%d\n", SanitizeString(strCommand), nMessageSize, pfrom->id);
+ LogPrintf("%s(%s, %u bytes) FAILED peer=%d\n", __func__, SanitizeString(strCommand), nMessageSize, pfrom->id);
break;
}
diff --git a/src/miner.h b/src/miner.h
index 0be3152d97..96a6b70ecd 100644
--- a/src/miner.h
+++ b/src/miner.h
@@ -14,7 +14,7 @@ class CBlockIndex;
class CReserveKey;
class CScript;
class CWallet;
-namespace Consensus { class Params; };
+namespace Consensus { struct Params; };
struct CBlockTemplate
{
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 3ae780abfd..069601ab67 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -107,7 +107,6 @@ static QString GetLangTerritory()
/** Set up translations */
static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTranslator, QTranslator &translatorBase, QTranslator &translator)
{
-
// Remove old translators
QApplication::removeTranslator(&qtTranslatorBase);
QApplication::removeTranslator(&qtTranslator);
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 198dd1fdf9..670d54c7e3 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -164,7 +164,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
// Create status bar
statusBar();
-
+
// Disable size grip because it looks ugly and nobody needs it
statusBar()->setSizeGripEnabled(false);
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index e4e9015c85..0a60632bfa 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -8,12 +8,12 @@
#include "addresstablemodel.h"
#include "bitcoinunits.h"
#include "guiutil.h"
-#include "init.h"
#include "optionsmodel.h"
#include "scicon.h"
#include "walletmodel.h"
#include "coincontrol.h"
+#include "init.h"
#include "main.h"
#include "wallet/wallet.h"
diff --git a/src/qt/forms/sendcoinsentry.ui b/src/qt/forms/sendcoinsentry.ui
index b362928438..48d0dd093c 100644
--- a/src/qt/forms/sendcoinsentry.ui
+++ b/src/qt/forms/sendcoinsentry.ui
@@ -195,7 +195,7 @@
</item>
</layout>
</widget>
- <widget class="QFrame" name="SendCoins_InsecurePaymentRequest">
+ <widget class="QFrame" name="SendCoins_UnauthenticatedPaymentRequest">
<property name="palette">
<palette>
<active>
@@ -612,7 +612,7 @@
</palette>
</property>
<property name="toolTip">
- <string>This is an unverified payment request.</string>
+ <string>This is an unauthenticated payment request.</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
@@ -700,7 +700,7 @@
</item>
</layout>
</widget>
- <widget class="QFrame" name="SendCoins_SecurePaymentRequest">
+ <widget class="QFrame" name="SendCoins_AuthenticatedPaymentRequest">
<property name="palette">
<palette>
<active>
@@ -1144,7 +1144,7 @@
</palette>
</property>
<property name="toolTip">
- <string>This is a verified payment request.</string>
+ <string>This is an authenticated payment request.</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index a5ee81db6c..4a1f728e18 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -741,14 +741,14 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
CFURLRef currentItemURL = NULL;
#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100
- if(&LSSharedFileListItemCopyResolvedURL)
- currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, NULL);
+ if(&LSSharedFileListItemCopyResolvedURL)
+ currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, NULL);
#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100
- else
- LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL);
+ else
+ LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL);
#endif
#else
- LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL);
+ LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL);
#endif
if(currentItemURL && CFEqual(currentItemURL, findUrl)) {
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index 5221ec3e24..543b977d8f 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -5,9 +5,10 @@
#include "recentrequeststablemodel.h"
#include "bitcoinunits.h"
-#include "clientversion.h"
#include "guiutil.h"
#include "optionsmodel.h"
+
+#include "clientversion.h"
#include "streams.h"
#include <boost/foreach.hpp>
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 59939fa871..0360f160d8 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -274,11 +274,11 @@ void SendCoinsDialog::on_sendButton_clicked()
recipientElement = tr("%1 to %2").arg(amount, address);
}
}
- else if(!rcp.authenticatedMerchant.isEmpty()) // secure payment request
+ else if(!rcp.authenticatedMerchant.isEmpty()) // authenticated payment request
{
recipientElement = tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.authenticatedMerchant));
}
- else // insecure payment request
+ else // unauthenticated payment request
{
recipientElement = tr("%1 to %2").arg(amount, address);
}
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index 6ac650e74f..ea35ed1d53 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -99,11 +99,11 @@ void SendCoinsEntry::clear()
ui->messageTextLabel->clear();
ui->messageTextLabel->hide();
ui->messageLabel->hide();
- // clear UI elements for insecure payment request
+ // clear UI elements for unauthenticated payment request
ui->payTo_is->clear();
ui->memoTextLabel_is->clear();
ui->payAmount_is->clear();
- // clear UI elements for secure payment request
+ // clear UI elements for authenticated payment request
ui->payTo_s->clear();
ui->memoTextLabel_s->clear();
ui->payAmount_s->clear();
@@ -190,21 +190,21 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
if (recipient.paymentRequest.IsInitialized()) // payment request
{
- if (recipient.authenticatedMerchant.isEmpty()) // insecure
+ if (recipient.authenticatedMerchant.isEmpty()) // unauthenticated
{
ui->payTo_is->setText(recipient.address);
ui->memoTextLabel_is->setText(recipient.message);
ui->payAmount_is->setValue(recipient.amount);
ui->payAmount_is->setReadOnly(true);
- setCurrentWidget(ui->SendCoins_InsecurePaymentRequest);
+ setCurrentWidget(ui->SendCoins_UnauthenticatedPaymentRequest);
}
- else // secure
+ else // authenticated
{
ui->payTo_s->setText(recipient.authenticatedMerchant);
ui->memoTextLabel_s->setText(recipient.message);
ui->payAmount_s->setValue(recipient.amount);
ui->payAmount_s->setReadOnly(true);
- setCurrentWidget(ui->SendCoins_SecurePaymentRequest);
+ setCurrentWidget(ui->SendCoins_AuthenticatedPaymentRequest);
}
}
else // normal payment
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 414fe02ff9..8430e017c1 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -4,11 +4,12 @@
#include "splashscreen.h"
+#include "networkstyle.h"
+
#include "clientversion.h"
#include "init.h"
-#include "networkstyle.h"
-#include "ui_interface.h"
#include "util.h"
+#include "ui_interface.h"
#include "version.h"
#ifdef ENABLE_WALLET
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 9b235f9130..4a2c51477e 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -10,7 +10,6 @@
#include "transactionrecord.h"
#include "base58.h"
-#include "wallet/db.h"
#include "main.h"
#include "script/script.h"
#include "timedata.h"
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 09ed8ce9fd..9b8be76beb 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -12,7 +12,6 @@
#include "transactiontablemodel.h"
#include "base58.h"
-#include "wallet/db.h"
#include "keystore.h"
#include "main.h"
#include "sync.h"
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index c979217a13..8393a8502e 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -419,7 +419,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
"\nResult:\n"
"{\n"
" \"hex\": \"value\", (string) The raw transaction with signature(s) (hex-encoded string)\n"
- " \"complete\": n (numeric) if transaction has a complete set of signature (0 if not)\n"
+ " \"complete\": true|false (boolean) if transaction has a complete set of signature\n"
"}\n"
"\nExamples:\n"
diff --git a/src/support/allocators/secure.h b/src/support/allocators/secure.h
index 7a74d87bb4..5e7bb66ea2 100644
--- a/src/support/allocators/secure.h
+++ b/src/support/allocators/secure.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_ALLOCATORS_SECURE_H
-#define BITCOIN_ALLOCATORS_SECURE_H
+#ifndef BITCOIN_SUPPORT_ALLOCATORS_SECURE_H
+#define BITCOIN_SUPPORT_ALLOCATORS_SECURE_H
#include "support/pagelocker.h"
@@ -59,4 +59,4 @@ struct secure_allocator : public std::allocator<T> {
// This is exactly like std::string, but with a custom allocator.
typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString;
-#endif // BITCOIN_ALLOCATORS_SECURE_H
+#endif // BITCOIN_SUPPORT_ALLOCATORS_SECURE_H
diff --git a/src/support/allocators/zeroafterfree.h b/src/support/allocators/zeroafterfree.h
index b01fcd088b..41e23392e8 100644
--- a/src/support/allocators/zeroafterfree.h
+++ b/src/support/allocators/zeroafterfree.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_ALLOCATORS_ZEROAFTERFREE_H
-#define BITCOIN_ALLOCATORS_ZEROAFTERFREE_H
+#ifndef BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
+#define BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
#include "support/cleanse.h"
@@ -45,4 +45,4 @@ struct zero_after_free_allocator : public std::allocator<T> {
// Byte-vector that clears its contents before deletion.
typedef std::vector<char, zero_after_free_allocator<char> > CSerializeData;
-#endif // BITCOIN_ALLOCATORS_ZEROAFTERFREE_H
+#endif // BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
diff --git a/src/support/pagelocker.h b/src/support/pagelocker.h
index 964be1aec4..3fd793072f 100644
--- a/src/support/pagelocker.h
+++ b/src/support/pagelocker.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_ALLOCATORS_PAGELOCKER_H
-#define BITCOIN_ALLOCATORS_PAGELOCKER_H
+#ifndef BITCOIN_SUPPORT_PAGELOCKER_H
+#define BITCOIN_SUPPORT_PAGELOCKER_H
#include "support/cleanse.h"
@@ -175,4 +175,4 @@ void UnlockObject(const T& t)
LockedPageManager::Instance().UnlockRange((void*)(&t), sizeof(T));
}
-#endif // BITCOIN_ALLOCATORS_PAGELOCKER_H
+#endif // BITCOIN_SUPPORT_PAGELOCKER_H
diff --git a/src/sync.h b/src/sync.h
index 27e80e813b..78b9043477 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -21,9 +21,6 @@
////////////////////////////////////////////////
/*
-
-
-
CCriticalSection mutex;
boost::recursive_mutex mutex;
@@ -42,20 +39,18 @@ ENTER_CRITICAL_SECTION(mutex); // no RAII
LEAVE_CRITICAL_SECTION(mutex); // no RAII
mutex.unlock();
-
-
-
*/
-
///////////////////////////////
// //
// THE ACTUAL IMPLEMENTATION //
// //
///////////////////////////////
-// Template mixin that adds -Wthread-safety locking annotations to a
-// subset of the mutex API.
+/**
+ * Template mixin that adds -Wthread-safety locking
+ * annotations to a subset of the mutex API.
+ */
template <typename PARENT>
class LOCKABLE AnnotatedMixin : public PARENT
{
@@ -76,8 +71,10 @@ public:
}
};
-/** Wrapped boost mutex: supports recursive locking, but no waiting */
-// TODO: We should move away from using the recursive lock by default.
+/**
+ * Wrapped boost mutex: supports recursive locking, but no waiting
+ * TODO: We should move away from using the recursive lock by default.
+ */
typedef AnnotatedMixin<boost::recursive_mutex> CCriticalSection;
/** Wrapped boost mutex: supports waiting but not recursive locking */
@@ -92,9 +89,7 @@ void LeaveCritical();
std::string LocksHeld();
void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs);
#else
-void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false)
-{
-}
+void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {}
void static inline LeaveCritical() {}
void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) {}
#endif
diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h
index 32746b00df..70aeb76723 100644
--- a/src/wallet/crypter.h
+++ b/src/wallet/crypter.h
@@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_CRYPTER_H
-#define BITCOIN_CRYPTER_H
+#ifndef BITCOIN_WALLET_CRYPTER_H
+#define BITCOIN_WALLET_CRYPTER_H
#include "keystore.h"
#include "serialize.h"
@@ -193,4 +193,4 @@ public:
boost::signals2::signal<void (CCryptoKeyStore* wallet)> NotifyStatusChanged;
};
-#endif // BITCOIN_CRYPTER_H
+#endif // BITCOIN_WALLET_CRYPTER_H
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 790ae50413..9596723b21 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_DB_H
-#define BITCOIN_DB_H
+#ifndef BITCOIN_WALLET_DB_H
+#define BITCOIN_WALLET_DB_H
#include "clientversion.h"
#include "serialize.h"
@@ -307,4 +307,4 @@ public:
bool static Rewrite(const std::string& strFile, const char* pszSkip = NULL);
};
-#endif // BITCOIN_DB_H
+#endif // BITCOIN_WALLET_DB_H
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 2566b2712b..0d40469393 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2038,7 +2038,7 @@ DBErrors CWallet::LoadWallet(bool& fFirstRunRet)
setKeyPool.clear();
// Note: can't top-up keypool here, because wallet is locked.
// User will be prompted to unlock wallet the next operation
- // the requires a new key.
+ // that requires a new key.
}
}
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 4dbb0e2e57..10969efee6 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_WALLET_H
-#define BITCOIN_WALLET_H
+#ifndef BITCOIN_WALLET_WALLET_H
+#define BITCOIN_WALLET_WALLET_H
#include "amount.h"
#include "key.h"
@@ -869,4 +869,4 @@ private:
std::vector<char> _ssExtra;
};
-#endif // BITCOIN_WALLET_H
+#endif // BITCOIN_WALLET_WALLET_H
diff --git a/src/wallet/wallet_ismine.h b/src/wallet/wallet_ismine.h
index 6293df8b10..5b9b0e0841 100644
--- a/src/wallet/wallet_ismine.h
+++ b/src/wallet/wallet_ismine.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_WALLET_ISMINE_H
-#define BITCOIN_WALLET_ISMINE_H
+#ifndef BITCOIN_WALLET_WALLET_ISMINE_H
+#define BITCOIN_WALLET_WALLET_ISMINE_H
#include "key.h"
#include "script/standard.h"
@@ -26,4 +26,4 @@ typedef uint8_t isminefilter;
isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
-#endif // BITCOIN_WALLET_ISMINE_H
+#endif // BITCOIN_WALLET_WALLET_ISMINE_H
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h
index e5f64ffaae..bc1a104b5b 100644
--- a/src/wallet/walletdb.h
+++ b/src/wallet/walletdb.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_WALLETDB_H
-#define BITCOIN_WALLETDB_H
+#ifndef BITCOIN_WALLET_WALLETDB_H
+#define BITCOIN_WALLET_WALLETDB_H
#include "amount.h"
#include "wallet/db.h"
@@ -140,4 +140,4 @@ private:
bool BackupWallet(const CWallet& wallet, const std::string& strDest);
void ThreadFlushWalletDB(const std::string& strFile);
-#endif // BITCOIN_WALLETDB_H
+#endif // BITCOIN_WALLET_WALLETDB_H