Skip to content

Commit 2c0867a

Browse files
author
MarcoFalke
committed
Merge #15308: build: Restore compatibility with older boost
119d360 travis: Document whether functional tests are run in the job name (Ben Woosley) 64f2854 Revert "travis: Compile trusty with depends for now" (Ben Woosley) 267eac0 Prefer boost::optional#get_value_or over #value_or (Ben Woosley) 1971f5b Piecewise construct to avoid invalid construction (Ben Woosley) Pull request description: In light of #14979, I realized that only qt 5.5+ was being tested under CI, while compatibility lists 5.2+. In #15276, Marco added Trusty to CI, building with depends. This changes that build to system libraries, in order to ensure ongoing compatibility with our claimed minimum required versions. Fixes #14983, previously open as #14998 Tree-SHA512: 6cff5e28c756ecb8bf797c8f6eb77c1944ba61a8dd6d7d4984e63eef384f6429dc79c505da3241c05b9c4db31c72b2a9846c7365aba9280f2e0620e5f3998d07
2 parents 5c99bb0 + 119d360 commit 2c0867a

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ jobs:
100100
BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-fuzz --enable-glibc-back-compat --enable-reduce-exports --enable-debug CXXFLAGS=\"-g0 -O2\""
101101
102102
- stage: test
103-
name: 'x86_64 Linux [GOAL: install] [trusty] [depends for now]'
103+
name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]'
104104
env: >-
105105
HOST=x86_64-unknown-linux-gnu
106106
DOCKER_NAME_TAG=ubuntu:14.04
107107
PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libicu-dev libpng-dev libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.1++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
108+
NO_DEPENDS=1
108109
RUN_FUNCTIONAL_TESTS=false
109110
GOAL="install"
110111
BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no"
@@ -139,7 +140,7 @@ jobs:
139140
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
140141
141142
- stage: test
142-
name: 'macOS 10.10 [GOAL: deploy]'
143+
name: 'macOS 10.10 [GOAL: deploy] [no functional tests]'
143144
env: >-
144145
HOST=x86_64-apple-darwin14
145146
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"

src/interfaces/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ class WalletImpl : public Wallet
353353
LOCK(m_wallet.cs_wallet);
354354
auto mi = m_wallet.mapWallet.find(txid);
355355
if (mi != m_wallet.mapWallet.end()) {
356-
num_blocks = locked_chain->getHeight().value_or(-1);
356+
num_blocks = locked_chain->getHeight().get_value_or(-1);
357357
in_mempool = mi->second.InMempool();
358358
order_form = mi->second.vOrderForm;
359359
tx_status = MakeWalletTxStatus(*locked_chain, mi->second);
@@ -384,7 +384,7 @@ class WalletImpl : public Wallet
384384
return false;
385385
}
386386
balances = getBalances();
387-
num_blocks = locked_chain->getHeight().value_or(-1);
387+
num_blocks = locked_chain->getHeight().get_value_or(-1);
388388
return true;
389389
}
390390
CAmount getBalance() override { return m_wallet.GetBalance(); }

src/validationinterface.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <list>
1515
#include <atomic>
1616
#include <future>
17+
#include <utility>
1718

1819
#include <boost/signals2/signal.hpp>
1920

@@ -77,7 +78,10 @@ size_t CMainSignals::CallbacksPending() {
7778
}
7879

7980
void CMainSignals::RegisterWithMempoolSignals(CTxMemPool& pool) {
80-
g_connNotifyEntryRemoved.emplace(&pool, pool.NotifyEntryRemoved.connect(std::bind(&CMainSignals::MempoolEntryRemoved, this, std::placeholders::_1, std::placeholders::_2)));
81+
g_connNotifyEntryRemoved.emplace(std::piecewise_construct,
82+
std::forward_as_tuple(&pool),
83+
std::forward_as_tuple(pool.NotifyEntryRemoved.connect(std::bind(&CMainSignals::MempoolEntryRemoved, this, std::placeholders::_1, std::placeholders::_2)))
84+
);
8185
}
8286

8387
void CMainSignals::UnregisterWithMempoolSignals(CTxMemPool& pool) {

src/wallet/rpcdump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
814814
file << strprintf("# Wallet dump created by Bitcoin %s\n", CLIENT_BUILD);
815815
file << strprintf("# * Created on %s\n", FormatISO8601DateTime(GetTime()));
816816
const Optional<int> tip_height = locked_chain->getHeight();
817-
file << strprintf("# * Best block at time of backup was %i (%s),\n", tip_height.value_or(-1), tip_height ? locked_chain->getBlockHash(*tip_height).ToString() : "(missing block hash)");
817+
file << strprintf("# * Best block at time of backup was %i (%s),\n", tip_height.get_value_or(-1), tip_height ? locked_chain->getBlockHash(*tip_height).ToString() : "(missing block hash)");
818818
file << strprintf("# mined on %s\n", tip_height ? FormatISO8601DateTime(locked_chain->getBlockTime(*tip_height)) : "(missing block time)");
819819
file << "\n";
820820

src/wallet/wallet.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,10 +1720,10 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
17201720
}
17211721
ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), 100); // hide progress dialog in GUI
17221722
if (block_height && fAbortRescan) {
1723-
WalletLogPrintf("Rescan aborted at block %d. Progress=%f\n", block_height.value_or(0), progress_current);
1723+
WalletLogPrintf("Rescan aborted at block %d. Progress=%f\n", block_height.get_value_or(0), progress_current);
17241724
result.status = ScanResult::USER_ABORT;
17251725
} else if (block_height && ShutdownRequested()) {
1726-
WalletLogPrintf("Rescan interrupted by shutdown request at block %d. Progress=%f\n", block_height.value_or(0), progress_current);
1726+
WalletLogPrintf("Rescan interrupted by shutdown request at block %d. Progress=%f\n", block_height.get_value_or(0), progress_current);
17271727
result.status = ScanResult::USER_ABORT;
17281728
}
17291729
}
@@ -2584,7 +2584,7 @@ static bool IsCurrentForAntiFeeSniping(interfaces::Chain::Lock& locked_chain)
25842584
*/
25852585
static uint32_t GetLocktimeForNewTransaction(interfaces::Chain::Lock& locked_chain)
25862586
{
2587-
uint32_t const height = locked_chain.getHeight().value_or(-1);
2587+
uint32_t const height = locked_chain.getHeight().get_value_or(-1);
25882588
uint32_t locktime;
25892589
// Discourage fee sniping.
25902590
//

0 commit comments

Comments
 (0)