1 From 283bc86d0ef816a018a77396baacdc89152be5ae Mon Sep 17 00:00:00 2001
2 From: John-Gee <john.ettedgui@gmail.com>
3 Date: Tue, 22 Dec 2020 06:25:23 -0800
4 Subject: [PATCH 1/2] Fix for Boost 1.74
8 src/qt/bitcoingui.cpp | 22 ++++++++--
9 src/qt/clientmodel.cpp | 46 +++++++++++++++-----
10 src/qt/splashscreen.cpp | 26 ++++++++---
11 src/qt/transactiontablemodel.cpp | 19 ++++++--
12 src/qt/walletmodel.cpp | 46 +++++++++++++++-----
13 src/rpc/server.cpp | 9 ++--
14 src/scheduler.cpp | 2 +-
15 src/test/scheduler_tests.cpp | 2 +-
16 src/torcontrol.cpp | 36 ++++++++++-----
17 src/validation.cpp | 9 +++-
18 src/validationinterface.cpp | 75 +++++++++++++++++++++++---------
19 12 files changed, 217 insertions(+), 77 deletions(-)
21 diff --git a/src/init.cpp b/src/init.cpp
22 index 0b7777fa0..f06c1811f 100644
26 #include <boost/algorithm/string/predicate.hpp>
27 #include <boost/algorithm/string/replace.hpp>
28 #include <boost/algorithm/string/split.hpp>
29 -#include <boost/bind.hpp>
30 +#include <boost/bind/bind.hpp>
31 #include <boost/filesystem.hpp>
32 #include <boost/function.hpp>
33 #include <boost/interprocess/sync/file_lock.hpp>
34 diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
35 index 670e4f2c6..80b18059b 100644
36 --- a/src/qt/bitcoingui.cpp
37 +++ b/src/qt/bitcoingui.cpp
38 @@ -75,6 +75,8 @@ const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
42 +#include <boost/bind/bind.hpp>
44 /** Display name for default wallet name. Uses tilde to avoid name
45 * collisions in the future with additional wallets */
46 const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
47 @@ -1196,15 +1198,27 @@ static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, co
48 void BitcoinGUI::subscribeToCoreSignals()
50 // Connect signals to client
51 - uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
52 - uiInterface.ThreadSafeQuestion.connect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
53 + uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this,
54 + boost::placeholders::_1,
55 + boost::placeholders::_2,
56 + boost::placeholders::_3));
57 + uiInterface.ThreadSafeQuestion.connect(boost::bind(ThreadSafeMessageBox, this,
58 + boost::placeholders::_1,
59 + boost::placeholders::_3,
60 + boost::placeholders::_4));
63 void BitcoinGUI::unsubscribeFromCoreSignals()
65 // Disconnect signals from client
66 - uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
67 - uiInterface.ThreadSafeQuestion.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
68 + uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this,
69 + boost::placeholders::_1,
70 + boost::placeholders::_2,
71 + boost::placeholders::_3));
72 + uiInterface.ThreadSafeQuestion.disconnect(boost::bind(ThreadSafeMessageBox, this,
73 + boost::placeholders::_1,
74 + boost::placeholders::_3,
75 + boost::placeholders::_4));
78 void BitcoinGUI::toggleNetworkActive()
79 diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
80 index 538bd9518..f134b04bb 100644
81 --- a/src/qt/clientmodel.cpp
82 +++ b/src/qt/clientmodel.cpp
87 +#include <boost/bind/bind.hpp>
91 static const int64_t nClientStartupTime = GetTime();
92 @@ -330,23 +332,43 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, const CB
93 void ClientModel::subscribeToCoreSignals()
95 // Connect signals to client
96 - uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
97 - uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
98 - uiInterface.NotifyNetworkActiveChanged.connect(boost::bind(NotifyNetworkActiveChanged, this, _1));
99 - uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2));
100 + uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this,
101 + boost::placeholders::_1,
102 + boost::placeholders::_2));
103 + uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this,
104 + boost::placeholders::_1));
105 + uiInterface.NotifyNetworkActiveChanged.connect(boost::bind(NotifyNetworkActiveChanged, this,
106 + boost::placeholders::_1));
107 + uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this,
108 + boost::placeholders::_1,
109 + boost::placeholders::_2));
110 uiInterface.BannedListChanged.connect(boost::bind(BannedListChanged, this));
111 - uiInterface.NotifyBlockTip.connect(boost::bind(BlockTipChanged, this, _1, _2, false));
112 - uiInterface.NotifyHeaderTip.connect(boost::bind(BlockTipChanged, this, _1, _2, true));
113 + uiInterface.NotifyBlockTip.connect(boost::bind(BlockTipChanged, this,
114 + boost::placeholders::_1,
115 + boost::placeholders::_2, false));
116 + uiInterface.NotifyHeaderTip.connect(boost::bind(BlockTipChanged, this,
117 + boost::placeholders::_1,
118 + boost::placeholders::_2, true));
121 void ClientModel::unsubscribeFromCoreSignals()
123 // Disconnect signals from client
124 - uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
125 - uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
126 - uiInterface.NotifyNetworkActiveChanged.disconnect(boost::bind(NotifyNetworkActiveChanged, this, _1));
127 - uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2));
128 + uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this,
129 + boost::placeholders::_1,
130 + boost::placeholders::_2));
131 + uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this,
132 + boost::placeholders::_1));
133 + uiInterface.NotifyNetworkActiveChanged.disconnect(boost::bind(NotifyNetworkActiveChanged, this,
134 + boost::placeholders::_1));
135 + uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this,
136 + boost::placeholders::_1,
137 + boost::placeholders::_2));
138 uiInterface.BannedListChanged.disconnect(boost::bind(BannedListChanged, this));
139 - uiInterface.NotifyBlockTip.disconnect(boost::bind(BlockTipChanged, this, _1, _2, false));
140 - uiInterface.NotifyHeaderTip.disconnect(boost::bind(BlockTipChanged, this, _1, _2, true));
141 + uiInterface.NotifyBlockTip.disconnect(boost::bind(BlockTipChanged, this,
142 + boost::placeholders::_1,
143 + boost::placeholders::_2, false));
144 + uiInterface.NotifyHeaderTip.disconnect(boost::bind(BlockTipChanged, this,
145 + boost::placeholders::_1,
146 + boost::placeholders::_2, true));
148 diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
149 index 656a2875c..c271c7fb9 100644
150 --- a/src/qt/splashscreen.cpp
151 +++ b/src/qt/splashscreen.cpp
154 #include <QRadialGradient>
156 +#include <boost/bind/bind.hpp>
158 SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) :
159 QWidget(0, f), curAlignment(0)
161 @@ -167,7 +169,9 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
163 void SplashScreen::ConnectWallet(CWallet* wallet)
165 - wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
166 + wallet->ShowProgress.connect(boost::bind(ShowProgress, this,
167 + boost::placeholders::_1,
168 + boost::placeholders::_2));
169 connectedWallets.push_back(wallet);
172 @@ -175,21 +179,29 @@ void SplashScreen::ConnectWallet(CWallet* wallet)
173 void SplashScreen::subscribeToCoreSignals()
175 // Connect signals to client
176 - uiInterface.InitMessage.connect(boost::bind(InitMessage, this, _1));
177 - uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
178 + uiInterface.InitMessage.connect(boost::bind(InitMessage, this,
179 + boost::placeholders::_1));
180 + uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this,
181 + boost::placeholders::_1,boost::placeholders::_2));
183 - uiInterface.LoadWallet.connect(boost::bind(&SplashScreen::ConnectWallet, this, _1));
184 + uiInterface.LoadWallet.connect(boost::bind(&SplashScreen::ConnectWallet, this,
185 + boost::placeholders::_1));
189 void SplashScreen::unsubscribeFromCoreSignals()
191 // Disconnect signals from client
192 - uiInterface.InitMessage.disconnect(boost::bind(InitMessage, this, _1));
193 - uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
194 + uiInterface.InitMessage.disconnect(boost::bind(InitMessage, this,
195 + boost::placeholders::_1));
196 + uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this,
197 + boost::placeholders::_1,
198 + boost::placeholders::_2));
200 Q_FOREACH(CWallet* const & pwallet, connectedWallets) {
201 - pwallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
202 + pwallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
203 + boost::placeholders::_1,
204 + boost::placeholders::_2));
208 diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
209 index 61466c8ed..57d6787c2 100644
210 --- a/src/qt/transactiontablemodel.cpp
211 +++ b/src/qt/transactiontablemodel.cpp
216 +#include <boost/bind/bind.hpp>
217 #include <boost/foreach.hpp>
219 // Amount column is right-aligned it contains numbers
220 @@ -777,13 +778,23 @@ static void ShowProgress(TransactionTableModel *ttm, const std::string &title, i
221 void TransactionTableModel::subscribeToCoreSignals()
223 // Connect signals to wallet
224 - wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
225 - wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
226 + wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this,
227 + boost::placeholders::_1,
228 + boost::placeholders::_2,
229 + boost::placeholders::_3));
230 + wallet->ShowProgress.connect(boost::bind(ShowProgress, this,
231 + boost::placeholders::_1,
232 + boost::placeholders::_2));
235 void TransactionTableModel::unsubscribeFromCoreSignals()
237 // Disconnect signals from wallet
238 - wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
239 - wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
240 + wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this,
241 + boost::placeholders::_1,
242 + boost::placeholders::_2,
243 + boost::placeholders::_3));
244 + wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
245 + boost::placeholders::_1,
246 + boost::placeholders::_2));
248 diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
249 index 0a5a7c3e9..fb893ae25 100644
250 --- a/src/qt/walletmodel.cpp
251 +++ b/src/qt/walletmodel.cpp
256 +#include <boost/bind/bind.hpp>
257 #include <boost/foreach.hpp>
259 WalletModel::WalletModel(const PlatformStyle *platformStyle, CWallet *_wallet, OptionsModel *_optionsModel, QObject *parent) :
260 @@ -502,21 +503,46 @@ static void NotifyWatchonlyChanged(WalletModel *walletmodel, bool fHaveWatchonly
261 void WalletModel::subscribeToCoreSignals()
263 // Connect signals to wallet
264 - wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
265 - wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5, _6));
266 - wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
267 - wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
268 - wallet->NotifyWatchonlyChanged.connect(boost::bind(NotifyWatchonlyChanged, this, _1));
269 + wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this,
270 + boost::placeholders::_1));
271 + wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this,
272 + boost::placeholders::_1,
273 + boost::placeholders::_2,
274 + boost::placeholders::_3,
275 + boost::placeholders::_4,
276 + boost::placeholders::_5,
277 + boost::placeholders::_6));
278 + wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this,
279 + boost::placeholders::_1,
280 + boost::placeholders::_2,
281 + boost::placeholders::_3));
282 + wallet->ShowProgress.connect(boost::bind(ShowProgress, this, boost::placeholders::_1,
283 + boost::placeholders::_2));
284 + wallet->NotifyWatchonlyChanged.connect(boost::bind(NotifyWatchonlyChanged, this,
285 + boost::placeholders::_1));
288 void WalletModel::unsubscribeFromCoreSignals()
290 // Disconnect signals from wallet
291 - wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
292 - wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5, _6));
293 - wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
294 - wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
295 - wallet->NotifyWatchonlyChanged.disconnect(boost::bind(NotifyWatchonlyChanged, this, _1));
296 + wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this,
297 + boost::placeholders::_1));
298 + wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this,
299 + boost::placeholders::_1,
300 + boost::placeholders::_2,
301 + boost::placeholders::_3,
302 + boost::placeholders::_4,
303 + boost::placeholders::_5,
304 + boost::placeholders::_6));
305 + wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this,
306 + boost::placeholders::_1,
307 + boost::placeholders::_2,
308 + boost::placeholders::_3));
309 + wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
310 + boost::placeholders::_1,
311 + boost::placeholders::_2));
312 + wallet->NotifyWatchonlyChanged.disconnect(boost::bind(NotifyWatchonlyChanged, this,
313 + boost::placeholders::_1));
316 // WalletModel::UnlockContext implementation
317 diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp
318 index 6ab5f834f..303806b99 100644
319 --- a/src/rpc/server.cpp
320 +++ b/src/rpc/server.cpp
323 #include <univalue.h>
325 -#include <boost/bind.hpp>
326 +#include <boost/bind/bind.hpp>
327 #include <boost/filesystem.hpp>
328 #include <boost/foreach.hpp>
329 #include <boost/shared_ptr.hpp>
330 @@ -58,12 +58,12 @@ void RPCServer::OnStopped(boost::function<void ()> slot)
332 void RPCServer::OnPreCommand(boost::function<void (const CRPCCommand&)> slot)
334 - g_rpcSignals.PreCommand.connect(boost::bind(slot, _1));
335 + g_rpcSignals.PreCommand.connect(boost::bind(slot, boost::placeholders::_1));
338 void RPCServer::OnPostCommand(boost::function<void (const CRPCCommand&)> slot)
340 - g_rpcSignals.PostCommand.connect(boost::bind(slot, _1));
341 + g_rpcSignals.PostCommand.connect(boost::bind(slot, boost::placeholders::_1));
344 void RPCTypeCheck(const UniValue& params,
345 @@ -516,7 +516,8 @@ std::vector<std::string> CRPCTable::listCommands() const
347 std::transform( mapCommands.begin(), mapCommands.end(),
348 std::back_inserter(commandList),
349 - boost::bind(&commandMap::value_type::first,_1) );
350 + boost::bind(&commandMap::value_type::first,
351 + boost::placeholders::_1) );
355 diff --git a/src/scheduler.cpp b/src/scheduler.cpp
356 index b01170074..f2b41024f 100644
357 --- a/src/scheduler.cpp
358 +++ b/src/scheduler.cpp
360 #include "reverselock.h"
363 -#include <boost/bind.hpp>
364 +#include <boost/bind/bind.hpp>
367 CScheduler::CScheduler() : nThreadsServicingQueue(0), stopRequested(false), stopWhenEmpty(false)
368 diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp
369 index e4ddf9d61..c76adfe8a 100644
370 --- a/src/test/scheduler_tests.cpp
371 +++ b/src/test/scheduler_tests.cpp
374 #include "test/test_bitcoin.h"
376 -#include <boost/bind.hpp>
377 +#include <boost/bind/bind.hpp>
378 #include <boost/random/mersenne_twister.hpp>
379 #include <boost/random/uniform_int_distribution.hpp>
380 #include <boost/thread.hpp>
381 diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp
382 index c49c5d9eb..d1299edf3 100644
383 --- a/src/torcontrol.cpp
384 +++ b/src/torcontrol.cpp
388 #include <boost/function.hpp>
389 -#include <boost/bind.hpp>
390 +#include <boost/bind/bind.hpp>
391 #include <boost/signals2/signal.hpp>
392 #include <boost/foreach.hpp>
393 #include <boost/algorithm/string/predicate.hpp>
394 @@ -403,8 +403,9 @@ TorController::TorController(struct event_base* _base, const std::string& _targe
396 LogPrintf("tor: Failed to create event for reconnection: out of memory?\n");
397 // Start connection attempts immediately
398 - if (!conn.Connect(_target, boost::bind(&TorController::connected_cb, this, _1),
399 - boost::bind(&TorController::disconnected_cb, this, _1) )) {
400 + if (!conn.Connect(_target, boost::bind(&TorController::connected_cb, this,
401 + boost::placeholders::_1),
402 + boost::bind(&TorController::disconnected_cb, this,boost::placeholders::_1) )) {
403 LogPrintf("tor: Initiating connection to Tor control port %s failed\n", _target);
405 // Read service private key if cached
406 @@ -475,7 +476,9 @@ void TorController::auth_cb(TorControlConnection& _conn, const TorControlReply&
407 // Note that the 'virtual' port doesn't have to be the same as our internal port, but this is just a convenient
408 // choice. TODO; refactor the shutdown sequence some day.
409 _conn.Command(strprintf("ADD_ONION %s Port=%i,127.0.0.1:%i", private_key, GetListenPort(), GetListenPort()),
410 - boost::bind(&TorController::add_onion_cb, this, _1, _2));
411 + boost::bind(&TorController::add_onion_cb, this,
412 + boost::placeholders::_1,
413 + boost::placeholders::_2));
415 LogPrintf("tor: Authentication failed\n");
417 @@ -530,7 +533,9 @@ void TorController::authchallenge_cb(TorControlConnection& _conn, const TorContr
420 std::vector<uint8_t> computedClientHash = ComputeResponse(TOR_SAFE_CLIENTKEY, cookie, clientNonce, serverNonce);
421 - _conn.Command("AUTHENTICATE " + HexStr(computedClientHash), boost::bind(&TorController::auth_cb, this, _1, _2));
422 + _conn.Command("AUTHENTICATE " + HexStr(computedClientHash), boost::bind(&TorController::auth_cb, this,
423 + boost::placeholders::_1,
424 + boost::placeholders::_2));
426 LogPrintf("tor: Invalid reply to AUTHCHALLENGE\n");
428 @@ -579,13 +584,17 @@ void TorController::protocolinfo_cb(TorControlConnection& _conn, const TorContro
429 if (methods.count("HASHEDPASSWORD")) {
430 LogPrint("tor", "tor: Using HASHEDPASSWORD authentication\n");
431 boost::replace_all(torpassword, "\"", "\\\"");
432 - _conn.Command("AUTHENTICATE \"" + torpassword + "\"", boost::bind(&TorController::auth_cb, this, _1, _2));
433 + _conn.Command("AUTHENTICATE \"" + torpassword + "\"", boost::bind(&TorController::auth_cb, this,
434 + boost::placeholders::_1,
435 + boost::placeholders::_2));
437 LogPrintf("tor: Password provided with -torpassword, but HASHEDPASSWORD authentication is not available\n");
439 } else if (methods.count("NULL")) {
440 LogPrint("tor", "tor: Using NULL authentication\n");
441 - _conn.Command("AUTHENTICATE", boost::bind(&TorController::auth_cb, this, _1, _2));
442 + _conn.Command("AUTHENTICATE", boost::bind(&TorController::auth_cb, this,
443 + boost::placeholders::_1,
444 + boost::placeholders::_2));
445 } else if (methods.count("SAFECOOKIE")) {
446 // Cookie: hexdump -e '32/1 "%02x""\n"' ~/.tor/control_auth_cookie
447 LogPrint("tor", "tor: Using SAFECOOKIE authentication, reading cookie authentication from %s\n", cookiefile);
448 @@ -595,7 +604,9 @@ void TorController::protocolinfo_cb(TorControlConnection& _conn, const TorContro
449 cookie = std::vector<uint8_t>(status_cookie.second.begin(), status_cookie.second.end());
450 clientNonce = std::vector<uint8_t>(TOR_NONCE_SIZE, 0);
451 GetRandBytes(&clientNonce[0], TOR_NONCE_SIZE);
452 - _conn.Command("AUTHCHALLENGE SAFECOOKIE " + HexStr(clientNonce), boost::bind(&TorController::authchallenge_cb, this, _1, _2));
453 + _conn.Command("AUTHCHALLENGE SAFECOOKIE " + HexStr(clientNonce), boost::bind(&TorController::authchallenge_cb, this,
454 + boost::placeholders::_1,
455 + boost::placeholders::_2));
457 if (status_cookie.first) {
458 LogPrintf("tor: Authentication cookie %s is not exactly %i bytes, as is required by the spec\n", cookiefile, TOR_COOKIE_SIZE);
459 @@ -617,7 +628,9 @@ void TorController::connected_cb(TorControlConnection& _conn)
461 reconnect_timeout = RECONNECT_TIMEOUT_START;
462 // First send a PROTOCOLINFO command to figure out what authentication is expected
463 - if (!_conn.Command("PROTOCOLINFO 1", boost::bind(&TorController::protocolinfo_cb, this, _1, _2)))
464 + if (!_conn.Command("PROTOCOLINFO 1", boost::bind(&TorController::protocolinfo_cb, this,
465 + boost::placeholders::_1,
466 + boost::placeholders::_2)))
467 LogPrintf("tor: Error sending initial protocolinfo command\n");
470 @@ -644,8 +657,9 @@ void TorController::Reconnect()
471 /* Try to reconnect and reestablish if we get booted - for example, Tor
474 - if (!conn.Connect(target, boost::bind(&TorController::connected_cb, this, _1),
475 - boost::bind(&TorController::disconnected_cb, this, _1) )) {
476 + if (!conn.Connect(target, boost::bind(&TorController::connected_cb, this,
477 + boost::placeholders::_1),
478 + boost::bind(&TorController::disconnected_cb, this, boost::placeholders::_1) )) {
479 LogPrintf("tor: Re-initiating connection to Tor control port %s failed\n", target);
482 diff --git a/src/validation.cpp b/src/validation.cpp
483 index 5b27b9ec5..2202d732d 100644
484 --- a/src/validation.cpp
485 +++ b/src/validation.cpp
488 #include <boost/algorithm/string/replace.hpp>
489 #include <boost/algorithm/string/join.hpp>
490 +#include <boost/bind/bind.hpp>
491 #include <boost/filesystem.hpp>
492 #include <boost/filesystem/fstream.hpp>
493 #include <boost/math/distributions/poisson.hpp>
494 @@ -179,7 +180,9 @@ private:
497 MemPoolConflictRemovalTracker(CTxMemPool &_pool) : pool(_pool) {
498 - pool.NotifyEntryRemoved.connect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
499 + pool.NotifyEntryRemoved.connect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved,
500 + this, boost::placeholders::_1,
501 + boost::placeholders::_2));
504 void NotifyEntryRemoved(CTransactionRef txRemoved, MemPoolRemovalReason reason) {
505 @@ -189,7 +192,9 @@ public:
508 ~MemPoolConflictRemovalTracker() {
509 - pool.NotifyEntryRemoved.disconnect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
510 + pool.NotifyEntryRemoved.disconnect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved,
511 + this, boost::placeholders::_1,
512 + boost::placeholders::_2));
513 for (const auto& tx : conflictedTxs) {
514 GetMainSignals().SyncTransaction(*tx, NULL, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
516 diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
517 index d4121a28b..c34d7d326 100644
518 --- a/src/validationinterface.cpp
519 +++ b/src/validationinterface.cpp
522 #include "validationinterface.h"
524 +#include <boost/bind/bind.hpp>
526 static CMainSignals g_signals;
528 CMainSignals& GetMainSignals()
529 @@ -13,29 +15,62 @@ CMainSignals& GetMainSignals()
532 void RegisterValidationInterface(CValidationInterface* pwalletIn) {
533 - g_signals.UpdatedBlockTip.connect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
534 - g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2, _3));
535 - g_signals.UpdatedTransaction.connect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
536 - g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
537 - g_signals.Inventory.connect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
538 - g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1, _2));
539 - g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
540 - g_signals.ScriptForMining.connect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
541 - g_signals.BlockFound.connect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
542 - g_signals.NewPoWValidBlock.connect(boost::bind(&CValidationInterface::NewPoWValidBlock, pwalletIn, _1, _2));
543 + g_signals.UpdatedBlockTip.connect(boost::bind(&CValidationInterface::UpdatedBlockTip,
544 + pwalletIn, boost::placeholders::_1,
545 + boost::placeholders::_2,
546 + boost::placeholders::_3));
547 + g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction,
548 + pwalletIn, boost::placeholders::_1,
549 + boost::placeholders::_2,
550 + boost::placeholders::_3));
551 + g_signals.UpdatedTransaction.connect(boost::bind(&CValidationInterface::UpdatedTransaction,
552 + pwalletIn, boost::placeholders::_1));
553 + g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain,
554 + pwalletIn, boost::placeholders::_1));
555 + g_signals.Inventory.connect(boost::bind(&CValidationInterface::Inventory,
556 + pwalletIn, boost::placeholders::_1));
557 + g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions,
558 + pwalletIn, boost::placeholders::_1, boost::placeholders::_2));
559 + g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked,
560 + pwalletIn, boost::placeholders::_1,
561 + boost::placeholders::_2));
562 + g_signals.ScriptForMining.connect(boost::bind(&CValidationInterface::GetScriptForMining,
563 + pwalletIn, boost::placeholders::_1));
564 + g_signals.BlockFound.connect(boost::bind(&CValidationInterface::ResetRequestCount,
565 + pwalletIn, boost::placeholders::_1));
566 + g_signals.NewPoWValidBlock.connect(boost::bind(&CValidationInterface::NewPoWValidBlock,
567 + pwalletIn, boost::placeholders::_1,
568 + boost::placeholders::_2));
571 void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
572 - g_signals.BlockFound.disconnect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
573 - g_signals.ScriptForMining.disconnect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
574 - g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
575 - g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1, _2));
576 - g_signals.Inventory.disconnect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
577 - g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
578 - g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
579 - g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2, _3));
580 - g_signals.UpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
581 - g_signals.NewPoWValidBlock.disconnect(boost::bind(&CValidationInterface::NewPoWValidBlock, pwalletIn, _1, _2));
582 + g_signals.BlockFound.disconnect(boost::bind(&CValidationInterface::ResetRequestCount,
583 + pwalletIn, boost::placeholders::_1));
584 + g_signals.ScriptForMining.disconnect(boost::bind(&CValidationInterface::GetScriptForMining,
585 + pwalletIn, boost::placeholders::_1));
586 + g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked,
587 + pwalletIn, boost::placeholders::_1,
588 + boost::placeholders::_2));
589 + g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions,
590 + pwalletIn, boost::placeholders::_1,
591 + boost::placeholders::_2));
592 + g_signals.Inventory.disconnect(boost::bind(&CValidationInterface::Inventory,
593 + pwalletIn, boost::placeholders::_1));
594 + g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain,
595 + pwalletIn, boost::placeholders::_1));
596 + g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction,
597 + pwalletIn, boost::placeholders::_1));
598 + g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction,
599 + pwalletIn, boost::placeholders::_1,
600 + boost::placeholders::_2,
601 + boost::placeholders::_3));
602 + g_signals.UpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::UpdatedBlockTip,
603 + pwalletIn, boost::placeholders::_1,
604 + boost::placeholders::_2,
605 + boost::placeholders::_3));
606 + g_signals.NewPoWValidBlock.disconnect(boost::bind(&CValidationInterface::NewPoWValidBlock,
607 + pwalletIn, boost::placeholders::_1,
608 + boost::placeholders::_2));
611 void UnregisterAllValidationInterfaces() {