Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3c1cfbc
Enable Travis checking for two Python linting rules we are currently …
practicalswift May 11, 2018
398a11c
Separate HaveKey function that checks whether a key is in a keystore
achow101 Apr 12, 2018
84b1554
Add 'sethdseed' RPC to initialize or replace HD seed
dooglus Sep 12, 2017
dab019c
Test sethdseed
achow101 Feb 27, 2018
94f0891
Allow -upgradewallet to upgradewallets to HD
achow101 Mar 31, 2018
1a282ae
Use a keypool of presplit keys after upgrading to hd chain split
achow101 Apr 21, 2018
9f8ee07
Bump wallet version for pre split keypool
achow101 Apr 28, 2018
7078ce7
[tests] Remove spurious error log in p2p_segwit.py
jnewbery May 9, 2018
ac3afa3
Add Clang thread safety annotations for variables guarded by cs_rpcWa…
practicalswift Apr 29, 2018
40bf408
Add Clang thread safety annotations for variables guarded by cs_nTime…
practicalswift Apr 29, 2018
82b4a3a
Add Clang thread safety annotations for variables guarded by cs_warnings
practicalswift Apr 29, 2018
117bb71
wallet: Reset BerkeleyDB handle after connection fails
real-or-random May 3, 2018
0dcb389
wallet: Improve logging when BerkeleyDB environment fails to close
real-or-random May 8, 2018
267dc9a
Add compile time checking for all cs_wallet runtime locking assertions
practicalswift Apr 25, 2018
10b0a00
Make --enable-debug to pick better options
eklitzke Mar 15, 2018
ca24046
wallet: Add Clang thread safety annotations for variables guarded by …
practicalswift Apr 30, 2018
d0f0881
Fix missing locking in CTxMemPool::check(const CCoinsViewCache *pcoins)
practicalswift Nov 14, 2017
84045e8
Fix missing locking in CTxMemPool::setSanityCheck(double dFrequency)
practicalswift Nov 16, 2017
f686c59
Add Clang thread safety analysis annotations
practicalswift Mar 12, 2018
aaf5ed9
util: warn about recursive -includeconf arguments in configuration files
kallewoof May 9, 2018
7da6c62
test: Ensure that recursive -includeconf produces appropriate warnings
kallewoof May 9, 2018
38ed996
Fix dead stores. Values were stored but never read. Limit scope.
practicalswift Apr 12, 2018
08dd9e5
Add assertion to guide static analyzers. Clang Static Analyzer needs …
practicalswift Apr 12, 2018
17c7f84
[qt]: changes sendcoinsdialog's box layout for improved readability.
marcohextor May 3, 2018
3bbafd7
Show arg info for -alerts
Bushstar May 16, 2018
5e93cb9
Break circular dependency: chain -> pow -> chain
Empact May 14, 2018
2110f17
Tighten up bech32::Decode(); add tests.
murrayn Apr 4, 2018
5f2670e
scheduler: Add Clang thread safety annotations for variables guarded …
practicalswift Apr 30, 2018
213d67a
Remove RBF from GUI
Bushstar May 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,22 @@ AC_LANG_PUSH([C++])
AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""])

if test "x$enable_debug" = xyes; then
CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER"
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -g3 -O0"
fi
# Prefer -Og, fall back to -O0 if that is unavailable.
AX_CHECK_COMPILE_FLAG(
[-Og],
[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -Og"]],
[AX_CHECK_COMPILE_FLAG([-O0],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"]],,[[$CXXFLAG_WERROR]])],
[[$CXXFLAG_WERROR]])

if test "x$GXX" = xyes; then
CXXFLAGS="$CXXFLAGS -g3 -O0"
fi
# Prefer -g3, fall back to -g if that is unavailable.
AX_CHECK_COMPILE_FLAG(
[-g3],
[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"]],
[AX_CHECK_COMPILE_FLAG([-g],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"]],,[[$CXXFLAG_WERROR]])],
[[$CXXFLAG_WERROR]])

AX_CHECK_PREPROC_FLAG([-DDEBUG],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"]],,[[$CXXFLAG_WERROR]])
AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"]],,[[$CXXFLAG_WERROR]])
fi

if test x$use_sanitizers != x; then
Expand Down Expand Up @@ -1293,6 +1301,8 @@ AC_SUBST(BITCOIN_CLI_NAME)
AC_SUBST(BITCOIN_TX_NAME)

AC_SUBST(RELDFLAGS)
AC_SUBST(DEBUG_CPPFLAGS)
AC_SUBST(DEBUG_CXXFLAGS)
AC_SUBST(ERROR_CXXFLAGS)
AC_SUBST(GPROF_CXXFLAGS)
AC_SUBST(GPROF_LDFLAGS)
Expand Down Expand Up @@ -1402,9 +1412,9 @@ echo " build os = $BUILD_OS"
echo
echo " CC = $CC"
echo " CFLAGS = $CFLAGS"
echo " CPPFLAGS = $CPPFLAGS"
echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CPPFLAGS"
echo " CXX = $CXX"
echo " CXXFLAGS = $CXXFLAGS"
echo " LDFLAGS = $LDFLAGS"
echo " CXXFLAGS = $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CXXFLAGS"
echo " LDFLAGS = $PTHREAD_CFLAGS $HARDENED_LDFLAGS $GPROF_LDFLAGS $LDFLAGS"
echo " ARFLAGS = $ARFLAGS"
echo
4 changes: 3 additions & 1 deletion contrib/devtools/lint-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
#
# Check for specified flake8 warnings in python files.

# E101 indentation contains mixed spaces and tabs
# E112 expected an indented block
# E113 unexpected indentation
# E115 expected an indented block (comment)
# E116 unexpected indentation (comment)
# E125 continuation line with same indent as next logical line
# E129 visually indented line with same indent as next logical line
# E131 continuation line unaligned for hanging indent
# E133 closing bracket is missing indentation
# E223 tab before operator
Expand Down Expand Up @@ -73,4 +75,4 @@
# W605 invalid escape sequence "x"
# W606 'async' and 'await' are reserved keywords starting with Python 3.7

flake8 --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W191,W291,W292,W293,W504,W601,W602,W603,W604,W605,W606 .
flake8 --ignore=B,C,E,F,I,N,W --select=E101,E112,E113,E115,E116,E125,E129,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W191,W291,W292,W293,W504,W601,W602,W603,W604,W605,W606 .
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
DIST_SUBDIRS = secp256k1 univalue

AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS)
AM_CXXFLAGS = $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS)
AM_CPPFLAGS = $(HARDENED_CPPFLAGS)
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS)
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS)
AM_LIBTOOLFLAGS = --preserve-dup-deps
EXTRA_LIBRARIES =

Expand Down
7 changes: 4 additions & 3 deletions src/bech32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ std::pair<std::string, data> Decode(const std::string& str) {
bool lower = false, upper = false;
for (size_t i = 0; i < str.size(); ++i) {
unsigned char c = str[i];
if (c < 33 || c > 126) return {};
if (c >= 'a' && c <= 'z') lower = true;
if (c >= 'A' && c <= 'Z') upper = true;
else if (c >= 'A' && c <= 'Z') upper = true;
else if (c < 33 || c > 126) return {};
}
if (lower && upper) return {};
size_t pos = str.rfind('1');
Expand All @@ -172,7 +172,8 @@ std::pair<std::string, data> Decode(const std::string& str) {
data values(str.size() - 1 - pos);
for (size_t i = 0; i < str.size() - 1 - pos; ++i) {
unsigned char c = str[i + pos + 1];
int8_t rev = (c < 33 || c > 126) ? -1 : CHARSET_REV[c];
int8_t rev = CHARSET_REV[c];

if (rev == -1) {
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion src/chain.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#define BITCOIN_CHAIN_H

#include <arith_uint256.h>
#include <consensus/params.h>
#include <primitives/block.h>
#include <pow.h>
#include <tinyformat.h>
#include <uint256.h>

Expand Down
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ void SetupServerArgs()
// Do not translate _(...) -help-debug options, Many technical terms, and only a very small audience, so is unnecessary stress to translators.
gArgs.AddArg("-?", _("Print this help message and exit"), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-version", _("Print version and exit"), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-alerts", strprintf(_("Receive and display P2P network alerts (default: %u)"), DEFAULT_ALERTS), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-alertnotify=<cmd>", _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)"), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-assumevalid=<hex>", strprintf(_("If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)"), defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-blocksdir=<dir>", _("Specify blocks directory (default: <datadir>/blocks)"), false, OptionsCategory::OPTIONS);
Expand Down
7 changes: 7 additions & 0 deletions src/keystore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,10 @@ CKeyID GetKeyForDestination(const CKeyStore& store, const CTxDestination& dest)
}
return CKeyID();
}

bool HaveKey(const CKeyStore& store, const CKey& key)
{
CKey key2;
key2.Set(key.begin(), key.end(), !key.IsCompressed());
return store.HaveKey(key.GetPubKey().GetID()) || store.HaveKey(key2.GetPubKey().GetID());
}
3 changes: 3 additions & 0 deletions src/keystore.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,7 @@ typedef std::map<CKeyID, std::pair<CPubKey, std::vector<unsigned char> > > Crypt
/** Return the CKeyID of the key involved in a script (if there is a unique one). */
CKeyID GetKeyForDestination(const CKeyStore& store, const CTxDestination& dest);

/** Checks if a CKey is in the given CKeyStore compressed or otherwise*/
bool HaveKey(const CKeyStore& store, const CKey& key);

#endif // BITCOIN_KEYSTORE_H
1 change: 0 additions & 1 deletion src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <consensus/merkle.h>
#include <consensus/validation.h>
#include <hash.h>
#include <validation.h>
#include <net.h>
#include <policy/feerate.h>
#include <policy/policy.h>
Expand Down
7 changes: 4 additions & 3 deletions src/miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <primitives/block.h>
#include <txmempool.h>
#include <validation.h>

#include <stdint.h>
#include <memory>
Expand Down Expand Up @@ -169,7 +170,7 @@ class BlockAssembler
/** Add transactions based on feerate including unconfirmed ancestors
* Increments nPackagesSelected / nDescendantsUpdated with corresponding
* statistics from the package selection (for logging statistics). */
void addPackageTxs(int &nPackagesSelected, int &nDescendantsUpdated);
void addPackageTxs(int &nPackagesSelected, int &nDescendantsUpdated) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs);

// helper functions for addPackageTxs()
/** Remove confirmed (inBlock) entries from given set */
Expand All @@ -183,13 +184,13 @@ class BlockAssembler
bool TestPackageTransactions(const CTxMemPool::setEntries& package);
/** Return true if given transaction from mapTx has already been evaluated,
* or if the transaction's cached data in mapTx is incorrect. */
bool SkipMapTxEntry(CTxMemPool::txiter it, indexed_modified_transaction_set &mapModifiedTx, CTxMemPool::setEntries &failedTx);
bool SkipMapTxEntry(CTxMemPool::txiter it, indexed_modified_transaction_set &mapModifiedTx, CTxMemPool::setEntries &failedTx) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs);
/** Sort the package in an order that is valid to appear in a block */
void SortForBlock(const CTxMemPool::setEntries& package, std::vector<CTxMemPool::txiter>& sortedEntries);
/** Add descendants of given transactions to mapModifiedTx with ancestor
* state updated assuming given transactions are inBlock. Returns number
* of updated descendants. */
int UpdatePackagesForAdded(const CTxMemPool::setEntries& alreadyAdded, indexed_modified_transaction_set &mapModifiedTx);
int UpdatePackagesForAdded(const CTxMemPool::setEntries& alreadyAdded, indexed_modified_transaction_set &mapModifiedTx) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs);
};

/** Modify the extranonce in a block */
Expand Down
1 change: 1 addition & 0 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ namespace {
const QStringList historyFilter = QStringList()
<< "importprivkey"
<< "importmulti"
<< "sethdseed"
<< "signmessagewithprivkey"
<< "signrawtransaction"
<< "signrawtransactionwithkey"
Expand Down
34 changes: 20 additions & 14 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,44 +283,51 @@ void SendCoinsDialog::on_sendButton_clicked()
address.append("</span>");

QString recipientElement;
recipientElement = "<br />";

if (!rcp.paymentRequest.IsInitialized()) // normal payment
{
if(rcp.label.length() > 0) // label with address
{
recipientElement = tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.label));
recipientElement.append(tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.label)));
recipientElement.append(QString(" (%1)").arg(address));
}
else // just address
{
recipientElement = tr("%1 to %2").arg(amount, address);
recipientElement.append(tr("%1 to %2").arg(amount, address));
}
}
else if(!rcp.authenticatedMerchant.isEmpty()) // authenticated payment request
{
recipientElement = tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.authenticatedMerchant));
recipientElement.append(tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.authenticatedMerchant)));
}
else // unauthenticated payment request
{
recipientElement = tr("%1 to %2").arg(amount, address);
recipientElement.append(tr("%1 to %2").arg(amount, address));
}

formatted.append(recipientElement);
}

QString questionString = tr("Are you sure you want to send?");
questionString.append("<br /><br />%1");
questionString.append("<br /><span style='font-size:10pt;'>");
questionString.append(tr("Please, review your transaction."));
questionString.append("</span><br />%1");

if(txFee > 0)
{
// append fee string if a fee is required
questionString.append("<hr /><span style='color:#aa0000;'>");
questionString.append(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), txFee));
questionString.append("</span> ");
questionString.append(tr("added as transaction fee"));
questionString.append("<hr /><b>");
questionString.append(tr("Transaction fee"));
questionString.append("</b>");

// append transaction size
questionString.append(" (" + QString::number((double)currentTransaction.getTransactionSize() / 1000) + " kB)");
questionString.append(" (" + QString::number((double)currentTransaction.getTransactionSize() / 1000) + " kB): ");

// append transaction fee value
questionString.append("<span style='color:#aa0000; font-weight:bold;'>");
questionString.append(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), txFee));
questionString.append("</span><br />");
}

// add total amount in all subdivision units
Expand All @@ -332,11 +339,10 @@ void SendCoinsDialog::on_sendButton_clicked()
if(u != model->getOptionsModel()->getDisplayUnit())
alternativeUnits.append(BitcoinUnits::formatHtmlWithUnit(u, totalAmount));
}
questionString.append(tr("Total Amount %1")
questionString.append(QString("<b>%1</b>: <b>%2</b>").arg(tr("Total Amount"))
.arg(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount)));
questionString.append(QString("<span style='font-size:10pt;font-weight:normal;'><br />(=%1)</span>")
.arg(alternativeUnits.join(" " + tr("or") + "<br />")));

questionString.append(QString("<br /><span style='font-size:10pt; font-weight:normal;'>(=%1)</span>")
.arg(alternativeUnits.join(" " + tr("or") + " ")));

SendConfirmationDialog confirmationDialog(tr("Confirm send coins"),
questionString.arg(formatted.join("<br />")), SEND_CONFIRM_DELAY, this);
Expand Down
1 change: 1 addition & 0 deletions src/rpc/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "sendtoaddress", 5 , "replaceable" },
{ "sendtoaddress", 6 , "conf_target" },
{ "settxfee", 0, "amount" },
{ "sethdseed", 0, "newkeypool" },
{ "getreceivedbyaddress", 1, "minconf" },
{ "getreceivedbyaccount", 1, "minconf" },
{ "getreceivedbylabel", 1, "minconf" },
Expand Down
1 change: 1 addition & 0 deletions src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
// Need to update only after we know CreateNewBlock succeeded
pindexPrev = pindexPrevNew;
}
assert(pindexPrev);
CBlock* pblock = &pblocktemplate->block; // pointer for convenience
const Consensus::Params& consensusParams = Params().GetConsensus();

Expand Down
6 changes: 3 additions & 3 deletions src/rpc/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#include <memory> // for unique_ptr
#include <unordered_map>

static bool fRPCRunning = false;
static bool fRPCInWarmup = true;
static std::string rpcWarmupStatus("RPC server started");
static CCriticalSection cs_rpcWarmup;
static bool fRPCRunning = false;
static bool fRPCInWarmup GUARDED_BY(cs_rpcWarmup) = true;
static std::string rpcWarmupStatus GUARDED_BY(cs_rpcWarmup) = "RPC server started";
/* Timer-creating functions */
static RPCTimerInterface* timerInterface = nullptr;
/* Map of name to timer. */
Expand Down
4 changes: 2 additions & 2 deletions src/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ class SingleThreadedSchedulerClient {
CScheduler *m_pscheduler;

CCriticalSection m_cs_callbacks_pending;
std::list<std::function<void (void)>> m_callbacks_pending;
bool m_are_callbacks_running = false;
std::list<std::function<void (void)>> m_callbacks_pending GUARDED_BY(m_cs_callbacks_pending);
bool m_are_callbacks_running GUARDED_BY(m_cs_callbacks_pending) = false;

void MaybeScheduleProcessQueue();
void ProcessQueue();
Expand Down
2 changes: 2 additions & 0 deletions src/test/bech32_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ BOOST_AUTO_TEST_CASE(bip173_testvectors_invalid)
"A1G7SGD8",
"10a06t8",
"1qzzfhee",
"a12UEL5L",
"A12uEL5L",
};
for (const std::string& str : CASES) {
auto ret = bech32::Decode(str);
Expand Down
1 change: 1 addition & 0 deletions src/test/blockencodings_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <blockencodings.h>
#include <consensus/merkle.h>
#include <chainparams.h>
#include <pow.h>
#include <random.h>

#include <test/test_bitcoin.h>
Expand Down
2 changes: 1 addition & 1 deletion src/test/mempool_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
}

template<typename name>
static void CheckSort(CTxMemPool &pool, std::vector<std::string> &sortedOrder)
static void CheckSort(CTxMemPool &pool, std::vector<std::string> &sortedOrder) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
{
BOOST_CHECK_EQUAL(pool.size(), sortedOrder.size());
typename CTxMemPool::indexed_transaction_set::index<name>::type::iterator it = pool.mapTx.get<name>().begin();
Expand Down
1 change: 1 addition & 0 deletions src/test/test_bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <validation.h>
#include <miner.h>
#include <net_processing.h>
#include <pow.h>
#include <ui_interface.h>
#include <streams.h>
#include <rpc/server.h>
Expand Down
1 change: 1 addition & 0 deletions src/test/util_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,7 @@ static void TestOtherProcess(fs::path dirname, std::string lockname, int fd)
ReleaseDirectoryLocks();
ch = true; // Always succeeds
rv = write(fd, &ch, 1);
assert(rv == 1);
break;
case ExitCommand:
close(fd);
Expand Down
2 changes: 1 addition & 1 deletion src/timedata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


static CCriticalSection cs_nTimeOffset;
static int64_t nTimeOffset = 0;
static int64_t nTimeOffset GUARDED_BY(cs_nTimeOffset) = 0;

/**
* "Never go to sea with two chronometers; take one or three."
Expand Down
2 changes: 1 addition & 1 deletion src/txmempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ static void CheckInputsAndUpdateCoins(const CTransaction& tx, CCoinsViewCache& m

void CTxMemPool::check(const CCoinsViewCache *pcoins) const
{
LOCK(cs);
if (nCheckFrequency == 0)
return;

Expand All @@ -632,7 +633,6 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
CCoinsViewCache mempoolDuplicate(const_cast<CCoinsViewCache*>(pcoins));
const int64_t spendheight = GetSpendHeight(mempoolDuplicate);

LOCK(cs);
std::list<const CTxMemPoolEntry*> waitingOnDependants;
for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
unsigned int i = 0;
Expand Down
Loading