Fix for Boost 1.74
This commit is contained in:
parent
c338a71bd2
commit
41406bfa17
|
@ -54,7 +54,7 @@
|
|||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/interprocess/sync/file_lock.hpp>
|
||||
|
|
|
@ -75,6 +75,8 @@ const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
|
|||
#endif
|
||||
;
|
||||
|
||||
#include <boost/bind/bind.hpp>
|
||||
|
||||
/** Display name for default wallet name. Uses tilde to avoid name
|
||||
* collisions in the future with additional wallets */
|
||||
const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
|
||||
|
@ -1196,15 +1198,27 @@ static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, co
|
|||
void BitcoinGUI::subscribeToCoreSignals()
|
||||
{
|
||||
// Connect signals to client
|
||||
uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
|
||||
uiInterface.ThreadSafeQuestion.connect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
|
||||
uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
uiInterface.ThreadSafeQuestion.connect(boost::bind(ThreadSafeMessageBox, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_3,
|
||||
boost::placeholders::_4));
|
||||
}
|
||||
|
||||
void BitcoinGUI::unsubscribeFromCoreSignals()
|
||||
{
|
||||
// Disconnect signals from client
|
||||
uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
|
||||
uiInterface.ThreadSafeQuestion.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
|
||||
uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
uiInterface.ThreadSafeQuestion.disconnect(boost::bind(ThreadSafeMessageBox, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_3,
|
||||
boost::placeholders::_4));
|
||||
}
|
||||
|
||||
void BitcoinGUI::toggleNetworkActive()
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
|
||||
#include <boost/bind/bind.hpp>
|
||||
|
||||
class CBlockIndex;
|
||||
|
||||
static const int64_t nClientStartupTime = GetTime();
|
||||
|
@ -330,23 +332,43 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, const CB
|
|||
void ClientModel::subscribeToCoreSignals()
|
||||
{
|
||||
// Connect signals to client
|
||||
uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
|
||||
uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
|
||||
uiInterface.NotifyNetworkActiveChanged.connect(boost::bind(NotifyNetworkActiveChanged, this, _1));
|
||||
uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2));
|
||||
uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this,
|
||||
boost::placeholders::_1));
|
||||
uiInterface.NotifyNetworkActiveChanged.connect(boost::bind(NotifyNetworkActiveChanged, this,
|
||||
boost::placeholders::_1));
|
||||
uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
uiInterface.BannedListChanged.connect(boost::bind(BannedListChanged, this));
|
||||
uiInterface.NotifyBlockTip.connect(boost::bind(BlockTipChanged, this, _1, _2, false));
|
||||
uiInterface.NotifyHeaderTip.connect(boost::bind(BlockTipChanged, this, _1, _2, true));
|
||||
uiInterface.NotifyBlockTip.connect(boost::bind(BlockTipChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2, false));
|
||||
uiInterface.NotifyHeaderTip.connect(boost::bind(BlockTipChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2, true));
|
||||
}
|
||||
|
||||
void ClientModel::unsubscribeFromCoreSignals()
|
||||
{
|
||||
// Disconnect signals from client
|
||||
uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
|
||||
uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
|
||||
uiInterface.NotifyNetworkActiveChanged.disconnect(boost::bind(NotifyNetworkActiveChanged, this, _1));
|
||||
uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2));
|
||||
uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this,
|
||||
boost::placeholders::_1));
|
||||
uiInterface.NotifyNetworkActiveChanged.disconnect(boost::bind(NotifyNetworkActiveChanged, this,
|
||||
boost::placeholders::_1));
|
||||
uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
uiInterface.BannedListChanged.disconnect(boost::bind(BannedListChanged, this));
|
||||
uiInterface.NotifyBlockTip.disconnect(boost::bind(BlockTipChanged, this, _1, _2, false));
|
||||
uiInterface.NotifyHeaderTip.disconnect(boost::bind(BlockTipChanged, this, _1, _2, true));
|
||||
uiInterface.NotifyBlockTip.disconnect(boost::bind(BlockTipChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2, false));
|
||||
uiInterface.NotifyHeaderTip.disconnect(boost::bind(BlockTipChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2, true));
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <QPainter>
|
||||
#include <QRadialGradient>
|
||||
|
||||
#include <boost/bind/bind.hpp>
|
||||
|
||||
SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) :
|
||||
QWidget(0, f), curAlignment(0)
|
||||
{
|
||||
|
@ -167,7 +169,9 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
|
|||
#ifdef ENABLE_WALLET
|
||||
void SplashScreen::ConnectWallet(CWallet* wallet)
|
||||
{
|
||||
wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
|
||||
wallet->ShowProgress.connect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
connectedWallets.push_back(wallet);
|
||||
}
|
||||
#endif
|
||||
|
@ -175,21 +179,29 @@ void SplashScreen::ConnectWallet(CWallet* wallet)
|
|||
void SplashScreen::subscribeToCoreSignals()
|
||||
{
|
||||
// Connect signals to client
|
||||
uiInterface.InitMessage.connect(boost::bind(InitMessage, this, _1));
|
||||
uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
|
||||
uiInterface.InitMessage.connect(boost::bind(InitMessage, this,
|
||||
boost::placeholders::_1));
|
||||
uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,boost::placeholders::_2));
|
||||
#ifdef ENABLE_WALLET
|
||||
uiInterface.LoadWallet.connect(boost::bind(&SplashScreen::ConnectWallet, this, _1));
|
||||
uiInterface.LoadWallet.connect(boost::bind(&SplashScreen::ConnectWallet, this,
|
||||
boost::placeholders::_1));
|
||||
#endif
|
||||
}
|
||||
|
||||
void SplashScreen::unsubscribeFromCoreSignals()
|
||||
{
|
||||
// Disconnect signals from client
|
||||
uiInterface.InitMessage.disconnect(boost::bind(InitMessage, this, _1));
|
||||
uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
|
||||
uiInterface.InitMessage.disconnect(boost::bind(InitMessage, this,
|
||||
boost::placeholders::_1));
|
||||
uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
#ifdef ENABLE_WALLET
|
||||
Q_FOREACH(CWallet* const & pwallet, connectedWallets) {
|
||||
pwallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
|
||||
pwallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <QIcon>
|
||||
#include <QList>
|
||||
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
// Amount column is right-aligned it contains numbers
|
||||
|
@ -777,13 +778,23 @@ static void ShowProgress(TransactionTableModel *ttm, const std::string &title, i
|
|||
void TransactionTableModel::subscribeToCoreSignals()
|
||||
{
|
||||
// Connect signals to wallet
|
||||
wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
|
||||
wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
|
||||
wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
wallet->ShowProgress.connect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
}
|
||||
|
||||
void TransactionTableModel::unsubscribeFromCoreSignals()
|
||||
{
|
||||
// Disconnect signals from wallet
|
||||
wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
|
||||
wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
|
||||
wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <QSet>
|
||||
#include <QTimer>
|
||||
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
WalletModel::WalletModel(const PlatformStyle *platformStyle, CWallet *_wallet, OptionsModel *_optionsModel, QObject *parent) :
|
||||
|
@ -502,21 +503,46 @@ static void NotifyWatchonlyChanged(WalletModel *walletmodel, bool fHaveWatchonly
|
|||
void WalletModel::subscribeToCoreSignals()
|
||||
{
|
||||
// Connect signals to wallet
|
||||
wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
|
||||
wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5, _6));
|
||||
wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
|
||||
wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
|
||||
wallet->NotifyWatchonlyChanged.connect(boost::bind(NotifyWatchonlyChanged, this, _1));
|
||||
wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this,
|
||||
boost::placeholders::_1));
|
||||
wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3,
|
||||
boost::placeholders::_4,
|
||||
boost::placeholders::_5,
|
||||
boost::placeholders::_6));
|
||||
wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
wallet->ShowProgress.connect(boost::bind(ShowProgress, this, boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
wallet->NotifyWatchonlyChanged.connect(boost::bind(NotifyWatchonlyChanged, this,
|
||||
boost::placeholders::_1));
|
||||
}
|
||||
|
||||
void WalletModel::unsubscribeFromCoreSignals()
|
||||
{
|
||||
// Disconnect signals from wallet
|
||||
wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
|
||||
wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5, _6));
|
||||
wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
|
||||
wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
|
||||
wallet->NotifyWatchonlyChanged.disconnect(boost::bind(NotifyWatchonlyChanged, this, _1));
|
||||
wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this,
|
||||
boost::placeholders::_1));
|
||||
wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3,
|
||||
boost::placeholders::_4,
|
||||
boost::placeholders::_5,
|
||||
boost::placeholders::_6));
|
||||
wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
wallet->NotifyWatchonlyChanged.disconnect(boost::bind(NotifyWatchonlyChanged, this,
|
||||
boost::placeholders::_1));
|
||||
}
|
||||
|
||||
// WalletModel::UnlockContext implementation
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <univalue.h>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
@ -58,12 +58,12 @@ void RPCServer::OnStopped(boost::function<void ()> slot)
|
|||
|
||||
void RPCServer::OnPreCommand(boost::function<void (const CRPCCommand&)> slot)
|
||||
{
|
||||
g_rpcSignals.PreCommand.connect(boost::bind(slot, _1));
|
||||
g_rpcSignals.PreCommand.connect(boost::bind(slot, boost::placeholders::_1));
|
||||
}
|
||||
|
||||
void RPCServer::OnPostCommand(boost::function<void (const CRPCCommand&)> slot)
|
||||
{
|
||||
g_rpcSignals.PostCommand.connect(boost::bind(slot, _1));
|
||||
g_rpcSignals.PostCommand.connect(boost::bind(slot, boost::placeholders::_1));
|
||||
}
|
||||
|
||||
void RPCTypeCheck(const UniValue& params,
|
||||
|
@ -516,7 +516,8 @@ std::vector<std::string> CRPCTable::listCommands() const
|
|||
|
||||
std::transform( mapCommands.begin(), mapCommands.end(),
|
||||
std::back_inserter(commandList),
|
||||
boost::bind(&commandMap::value_type::first,_1) );
|
||||
boost::bind(&commandMap::value_type::first,
|
||||
boost::placeholders::_1) );
|
||||
return commandList;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "reverselock.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <utility>
|
||||
|
||||
CScheduler::CScheduler() : nThreadsServicingQueue(0), stopRequested(false), stopWhenEmpty(false)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "test/test_bitcoin.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/random/mersenne_twister.hpp>
|
||||
#include <boost/random/uniform_int_distribution.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/signals2/signal.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
@ -403,8 +403,9 @@ TorController::TorController(struct event_base* _base, const std::string& _targe
|
|||
if (!reconnect_ev)
|
||||
LogPrintf("tor: Failed to create event for reconnection: out of memory?\n");
|
||||
// Start connection attempts immediately
|
||||
if (!conn.Connect(_target, boost::bind(&TorController::connected_cb, this, _1),
|
||||
boost::bind(&TorController::disconnected_cb, this, _1) )) {
|
||||
if (!conn.Connect(_target, boost::bind(&TorController::connected_cb, this,
|
||||
boost::placeholders::_1),
|
||||
boost::bind(&TorController::disconnected_cb, this,boost::placeholders::_1) )) {
|
||||
LogPrintf("tor: Initiating connection to Tor control port %s failed\n", _target);
|
||||
}
|
||||
// Read service private key if cached
|
||||
|
@ -475,7 +476,9 @@ void TorController::auth_cb(TorControlConnection& _conn, const TorControlReply&
|
|||
// Note that the 'virtual' port doesn't have to be the same as our internal port, but this is just a convenient
|
||||
// choice. TODO; refactor the shutdown sequence some day.
|
||||
_conn.Command(strprintf("ADD_ONION %s Port=%i,127.0.0.1:%i", private_key, GetListenPort(), GetListenPort()),
|
||||
boost::bind(&TorController::add_onion_cb, this, _1, _2));
|
||||
boost::bind(&TorController::add_onion_cb, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
} else {
|
||||
LogPrintf("tor: Authentication failed\n");
|
||||
}
|
||||
|
@ -530,7 +533,9 @@ void TorController::authchallenge_cb(TorControlConnection& _conn, const TorContr
|
|||
}
|
||||
|
||||
std::vector<uint8_t> computedClientHash = ComputeResponse(TOR_SAFE_CLIENTKEY, cookie, clientNonce, serverNonce);
|
||||
_conn.Command("AUTHENTICATE " + HexStr(computedClientHash), boost::bind(&TorController::auth_cb, this, _1, _2));
|
||||
_conn.Command("AUTHENTICATE " + HexStr(computedClientHash), boost::bind(&TorController::auth_cb, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
} else {
|
||||
LogPrintf("tor: Invalid reply to AUTHCHALLENGE\n");
|
||||
}
|
||||
|
@ -579,13 +584,17 @@ void TorController::protocolinfo_cb(TorControlConnection& _conn, const TorContro
|
|||
if (methods.count("HASHEDPASSWORD")) {
|
||||
LogPrint("tor", "tor: Using HASHEDPASSWORD authentication\n");
|
||||
boost::replace_all(torpassword, "\"", "\\\"");
|
||||
_conn.Command("AUTHENTICATE \"" + torpassword + "\"", boost::bind(&TorController::auth_cb, this, _1, _2));
|
||||
_conn.Command("AUTHENTICATE \"" + torpassword + "\"", boost::bind(&TorController::auth_cb, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
} else {
|
||||
LogPrintf("tor: Password provided with -torpassword, but HASHEDPASSWORD authentication is not available\n");
|
||||
}
|
||||
} else if (methods.count("NULL")) {
|
||||
LogPrint("tor", "tor: Using NULL authentication\n");
|
||||
_conn.Command("AUTHENTICATE", boost::bind(&TorController::auth_cb, this, _1, _2));
|
||||
_conn.Command("AUTHENTICATE", boost::bind(&TorController::auth_cb, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
} else if (methods.count("SAFECOOKIE")) {
|
||||
// Cookie: hexdump -e '32/1 "%02x""\n"' ~/.tor/control_auth_cookie
|
||||
LogPrint("tor", "tor: Using SAFECOOKIE authentication, reading cookie authentication from %s\n", cookiefile);
|
||||
|
@ -595,7 +604,9 @@ void TorController::protocolinfo_cb(TorControlConnection& _conn, const TorContro
|
|||
cookie = std::vector<uint8_t>(status_cookie.second.begin(), status_cookie.second.end());
|
||||
clientNonce = std::vector<uint8_t>(TOR_NONCE_SIZE, 0);
|
||||
GetRandBytes(&clientNonce[0], TOR_NONCE_SIZE);
|
||||
_conn.Command("AUTHCHALLENGE SAFECOOKIE " + HexStr(clientNonce), boost::bind(&TorController::authchallenge_cb, this, _1, _2));
|
||||
_conn.Command("AUTHCHALLENGE SAFECOOKIE " + HexStr(clientNonce), boost::bind(&TorController::authchallenge_cb, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
} else {
|
||||
if (status_cookie.first) {
|
||||
LogPrintf("tor: Authentication cookie %s is not exactly %i bytes, as is required by the spec\n", cookiefile, TOR_COOKIE_SIZE);
|
||||
|
@ -617,7 +628,9 @@ void TorController::connected_cb(TorControlConnection& _conn)
|
|||
{
|
||||
reconnect_timeout = RECONNECT_TIMEOUT_START;
|
||||
// First send a PROTOCOLINFO command to figure out what authentication is expected
|
||||
if (!_conn.Command("PROTOCOLINFO 1", boost::bind(&TorController::protocolinfo_cb, this, _1, _2)))
|
||||
if (!_conn.Command("PROTOCOLINFO 1", boost::bind(&TorController::protocolinfo_cb, this,
|
||||
boost::placeholders::_1,
|
||||
boost::placeholders::_2)))
|
||||
LogPrintf("tor: Error sending initial protocolinfo command\n");
|
||||
}
|
||||
|
||||
|
@ -644,8 +657,9 @@ void TorController::Reconnect()
|
|||
/* Try to reconnect and reestablish if we get booted - for example, Tor
|
||||
* may be restarting.
|
||||
*/
|
||||
if (!conn.Connect(target, boost::bind(&TorController::connected_cb, this, _1),
|
||||
boost::bind(&TorController::disconnected_cb, this, _1) )) {
|
||||
if (!conn.Connect(target, boost::bind(&TorController::connected_cb, this,
|
||||
boost::placeholders::_1),
|
||||
boost::bind(&TorController::disconnected_cb, this, boost::placeholders::_1) )) {
|
||||
LogPrintf("tor: Re-initiating connection to Tor control port %s failed\n", target);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/math/distributions/poisson.hpp>
|
||||
|
@ -179,7 +180,9 @@ private:
|
|||
|
||||
public:
|
||||
MemPoolConflictRemovalTracker(CTxMemPool &_pool) : pool(_pool) {
|
||||
pool.NotifyEntryRemoved.connect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
|
||||
pool.NotifyEntryRemoved.connect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved,
|
||||
this, boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
}
|
||||
|
||||
void NotifyEntryRemoved(CTransactionRef txRemoved, MemPoolRemovalReason reason) {
|
||||
|
@ -189,7 +192,9 @@ public:
|
|||
}
|
||||
|
||||
~MemPoolConflictRemovalTracker() {
|
||||
pool.NotifyEntryRemoved.disconnect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
|
||||
pool.NotifyEntryRemoved.disconnect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved,
|
||||
this, boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
for (const auto& tx : conflictedTxs) {
|
||||
GetMainSignals().SyncTransaction(*tx, NULL, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include "validationinterface.h"
|
||||
|
||||
#include <boost/bind/bind.hpp>
|
||||
|
||||
static CMainSignals g_signals;
|
||||
|
||||
CMainSignals& GetMainSignals()
|
||||
|
@ -13,29 +15,62 @@ CMainSignals& GetMainSignals()
|
|||
}
|
||||
|
||||
void RegisterValidationInterface(CValidationInterface* pwalletIn) {
|
||||
g_signals.UpdatedBlockTip.connect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
|
||||
g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2, _3));
|
||||
g_signals.UpdatedTransaction.connect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
|
||||
g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
|
||||
g_signals.Inventory.connect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
|
||||
g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1, _2));
|
||||
g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
|
||||
g_signals.ScriptForMining.connect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
|
||||
g_signals.BlockFound.connect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
|
||||
g_signals.NewPoWValidBlock.connect(boost::bind(&CValidationInterface::NewPoWValidBlock, pwalletIn, _1, _2));
|
||||
g_signals.UpdatedBlockTip.connect(boost::bind(&CValidationInterface::UpdatedBlockTip,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
g_signals.UpdatedTransaction.connect(boost::bind(&CValidationInterface::UpdatedTransaction,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.Inventory.connect(boost::bind(&CValidationInterface::Inventory,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions,
|
||||
pwalletIn, boost::placeholders::_1, boost::placeholders::_2));
|
||||
g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
g_signals.ScriptForMining.connect(boost::bind(&CValidationInterface::GetScriptForMining,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.BlockFound.connect(boost::bind(&CValidationInterface::ResetRequestCount,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.NewPoWValidBlock.connect(boost::bind(&CValidationInterface::NewPoWValidBlock,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
}
|
||||
|
||||
void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
|
||||
g_signals.BlockFound.disconnect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
|
||||
g_signals.ScriptForMining.disconnect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
|
||||
g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
|
||||
g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1, _2));
|
||||
g_signals.Inventory.disconnect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
|
||||
g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
|
||||
g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
|
||||
g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2, _3));
|
||||
g_signals.UpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
|
||||
g_signals.NewPoWValidBlock.disconnect(boost::bind(&CValidationInterface::NewPoWValidBlock, pwalletIn, _1, _2));
|
||||
g_signals.BlockFound.disconnect(boost::bind(&CValidationInterface::ResetRequestCount,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.ScriptForMining.disconnect(boost::bind(&CValidationInterface::GetScriptForMining,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
g_signals.Inventory.disconnect(boost::bind(&CValidationInterface::Inventory,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction,
|
||||
pwalletIn, boost::placeholders::_1));
|
||||
g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
g_signals.UpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::UpdatedBlockTip,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2,
|
||||
boost::placeholders::_3));
|
||||
g_signals.NewPoWValidBlock.disconnect(boost::bind(&CValidationInterface::NewPoWValidBlock,
|
||||
pwalletIn, boost::placeholders::_1,
|
||||
boost::placeholders::_2));
|
||||
}
|
||||
|
||||
void UnregisterAllValidationInterfaces() {
|
||||
|
|
Loading…
Reference in New Issue