mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
fix: resolve numerous compilation warnings under -Wall (#4599)
* fix: compilation warnings ./validation.h:266:13: warning: ‘bool AcceptToMemoryPoolWithTime(const CChainParams&, CTxMemPool&, CValidationState&, const CTransactionRef&, bool*, int64_t, bool, CAmount, bool)’ declared ‘static’ but never defined [-Wunused-function] static bool AcceptToMemoryPoolWithTime(const CChainParams& chainparams, CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, ^~~~~~~~~~~~~~~~~~~~~~~~~~ * fix: compilation warnings ./coinjoin/client.h: In constructor ‘CCoinJoinClientManager::CCoinJoinClientManager(CWallet&)’: ./coinjoin/client.h:199:10: warning: ‘CCoinJoinClientManager::fCreateAutoBackups’ will be initialized after [-Wreorder] bool fCreateAutoBackups; // builtin support for automatic backups ^~~~~~~~~~~~~~~~~~ ./coinjoin/client.h:187:14: warning: ‘CWallet& CCoinJoinClientManager::mixingWallet’ [-Wreorder] CWallet& mixingWallet; ^~~~~~~~~~~~ ./coinjoin/client.h:205:14: warning: when initialized here [-Wreorder] explicit CCoinJoinClientManager(CWallet& wallet) : ^~~~~~~~~~~~~~~~~~~~~~ * fix: compilation warnings interfaces/wallet.cpp: In constructor ‘interfaces::{anonymous}::WalletImpl::WalletImpl(const std::shared_ptr<CWallet>&)’: interfaces/wallet.cpp:594:30: warning: ‘interfaces::{anonymous}::WalletImpl::m_wallet’ will be initialized after [-Wreorder] std::shared_ptr<CWallet> m_wallet; ^~~~~~~~ interfaces/wallet.cpp:191:18: warning: ‘interfaces::{anonymous}::CoinJoinImpl interfaces::{anonymous}::WalletImpl::m_coinjoin’ [-Wreorder] CoinJoinImpl m_coinjoin; ^~~~~~~~~~ interfaces/wallet.cpp:193:14: warning: when initialized here [-Wreorder] explicit WalletImpl(const std::shared_ptr<CWallet>& wallet) : m_wallet(wallet), m_coinjoin(wallet) {} ^~~~~~~~~~ * fix: compilation warnings validation.cpp:165:13: warning: ‘void CheckBlockIndex(const Consensus::Params&)’ declared ‘static’ but never defined [-Wunused-function] static void CheckBlockIndex(const Consensus::Params& consensusParams); ^~~~~~~~~~~~~~~ * fix: compilation warnings bls/bls_worker.cpp: In constructor ‘ContributionVerifier::ContributionVerifier(CBLSId, const std::vector<std::shared_ptr<std::vector<CBLSPublicKey> > >&, const BLSSecretKeyVector&, size_t, bool, bool, ctpl::thread_pool&, std::function<void(const std::vector<bool>&)>)’: bls/bls_worker.cpp:425:51: warning: ‘ContributionVerifier::doneCallback’ will be initialized after [-Wreorder] std::function<void(const std::vector<bool>&)> doneCallback; ^~~~~~~~~~~~ bls/bls_worker.cpp:420:12: warning: ‘size_t ContributionVerifier::batchCount’ [-Wreorder] size_t batchCount; ^~~~~~~~~~ bls/bls_worker.cpp:427:5: warning: when initialized here [-Wreorder] ContributionVerifier(CBLSId _forId, const std::vector<BLSVerificationVectorPtr>& _vvecs, ^~~~~~~~~~~~~~~~~~~~ * fix: compilation warnings bls/bls_worker.cpp:342:10: warning: ‘VectorAggregator<CBLSPublicKey>::parallel’ will be initialized after [-Wreorder] bool parallel; ^~~~~~~~ bls/bls_worker.cpp:340:12: warning: ‘size_t VectorAggregator<CBLSPublicKey>::start’ [-Wreorder] size_t start; ^~~~~ bls/bls_worker.cpp:350:5: warning: when initialized here [-Wreorder] VectorAggregator(const VectorVectorType& _vecs, ^~~~~~~~~~~~~~~~ bls/bls_worker.cpp:343:24: warning: ‘VectorAggregator<CBLSPublicKey>::workerPool’ will be initialized after [-Wreorder] ctpl::thread_pool& workerPool; ^~~~~~~~~~ bls/bls_worker.cpp:337:18: warning: ‘VectorAggregator<CBLSPublicKey>::DoneCallback VectorAggregator<CBLSPublicKey>::doneCallback’ [-Wreorder] DoneCallback doneCallback; ^~~~~~~~~~~~ bls/bls_worker.cpp:350:5: warning: when initialized here [-Wreorder] VectorAggregator(const VectorVectorType& _vecs, ^~~~~~~~~~~~~~~~ * fix: compilation warnings bls/bls_worker.cpp:494:235: required from here bls/bls_worker.cpp:136:24: warning: ‘Aggregator<CBLSSecretKey>::workerPool’ will be initialized after [-Wreorder] ctpl::thread_pool& workerPool; ^~~~~~~~~~ bls/bls_worker.cpp:135:10: warning: ‘bool Aggregator<CBLSSecretKey>::parallel’ [-Wreorder] bool parallel; ^~~~~~~~ bls/bls_worker.cpp:152:5: warning: when initialized here [-Wreorder] Aggregator(const std::vector<TP>& _inputVec, ^~~~~~~~~~ * fix: compilation warnings bench/string_cast.cpp: In lambda function: bench/string_cast.cpp:22:13: warning: statement has no effect [-Wunused-value] atoi("1"); ~~~~^~~~~ * fix: compilation warnings ./llmq/dkgsessionhandler.h: In constructor ‘llmq::CDKGPendingMessages::CDKGPendingMessages(size_t, int)’: ./llmq/dkgsessionhandler.h:48:12: warning: ‘llmq::CDKGPendingMessages::maxMessagesPerNode’ will be initialized after [-Wreorder] size_t maxMessagesPerNode GUARDED_BY(cs); ^~~~~~~~~~~~~~~~~~ ./llmq/dkgsessionhandler.h:47:15: warning: ‘const int llmq::CDKGPendingMessages::invType’ [-Wreorder] const int invType; ^~~~~~~ llmq/dkgsessionhandler.cpp:23:1: warning: when initialized here [-Wreorder] CDKGPendingMessages::CDKGPendingMessages(size_t _maxMessagesPerNode, int _invType) : ^~~~~~~~~~~~~~~~~~~ * fix: compilation warnings Not sure this one is correct, but I believe so. Seems like the `!= 0` is completely not needed rpc/masternode.cpp: In function ‘UniValue masternode_payments(const JSONRPCRequest&)’: rpc/masternode.cpp:442:31: warning: suggest parentheses around comparison in operand of ‘!=’ [-Wparentheses] while (vecPayments.size() < std::abs(nCount) != 0 && pindex != nullptr) { ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ * fix: compilation warnings test/cachemultimap_tests.cpp:14:13: warning: ‘void cachemultimap_tests::DumpMap(const CacheMultiMap<int, int>&)’ defined but not used [-Wunused-function] static void DumpMap(const CacheMultiMap<int,int>& cmmap) ^~~~~~~ * fix: compilation warnings In file included from qt/appearancewidget.cpp:11: ./qt/appearancewidget.h: In constructor ‘AppearanceWidget::AppearanceWidget(QWidget*)’: ./qt/appearancewidget.h:52:25: warning: ‘AppearanceWidget::prevFontFamily’ will be initialized after [-Wreorder] GUIUtil::FontFamily prevFontFamily; ^~~~~~~~~~~~~~ ./qt/appearancewidget.h:51:9: warning: ‘int AppearanceWidget::prevScale’ [-Wreorder] int prevScale; ^~~~~~~~~ qt/appearancewidget.cpp:21:1: warning: when initialized here [-Wreorder] AppearanceWidget::AppearanceWidget(QWidget* parent) : ^~~~~~~~~~~~~~~~ * fix: compilation warnings In file included from qt/bitcoingui.cpp:6: ./qt/bitcoingui.h: In constructor ‘BitcoinGUI::BitcoinGUI(interfaces::Node&, const NetworkStyle*, QWidget*)’: ./qt/bitcoingui.h:212:31: warning: ‘BitcoinGUI::m_network_style’ will be initialized after [-Wreorder] const NetworkStyle* const m_network_style; ^~~~~~~~~~~~~~~ ./qt/bitcoingui.h:172:34: warning: ‘const std::unique_ptr<QMenu> BitcoinGUI::trayIconMenu’ [-Wreorder] const std::unique_ptr<QMenu> trayIconMenu; ^~~~~~~~~~~~ qt/bitcoingui.cpp:81:1: warning: when initialized here [-Wreorder] BitcoinGUI::BitcoinGUI(interfaces::Node& node, const NetworkStyle* networkStyle, QWidget* parent) : ^~~~~~~~~~ * fix: compilation warnings In file included from qt/masternodelist.cpp:1: ./qt/masternodelist.h: In constructor ‘MasternodeList::MasternodeList(QWidget*)’: ./qt/masternodelist.h:66:18: warning: ‘MasternodeList::walletModel’ will be initialized after [-Wreorder] WalletModel* walletModel; ^~~~~~~~~~~ ./qt/masternodelist.h:61:10: warning: ‘bool MasternodeList::fFilterUpdatedDIP3’ [-Wreorder] bool fFilterUpdatedDIP3; ^~~~~~~~~~~~~~~~~~ qt/masternodelist.cpp:45:1: warning: when initialized here [-Wreorder] MasternodeList::MasternodeList(QWidget* parent) : ^~~~~~~~~~~~~~ In file included from qt/masternodelist.cpp:1: ./qt/masternodelist.h:61:10: warning: ‘MasternodeList::fFilterUpdatedDIP3’ will be initialized after [-Wreorder] bool fFilterUpdatedDIP3; ^~~~~~~~~~~~~~~~~~ ./qt/masternodelist.h:59:13: warning: ‘int64_t MasternodeList::nTimeFilterUpdatedDIP3’ [-Wreorder] int64_t nTimeFilterUpdatedDIP3; ^~~~~~~~~~~~~~~~~~~~~~ qt/masternodelist.cpp:45:1: warning: when initialized here [-Wreorder] MasternodeList::MasternodeList(QWidget* parent) : ^~~~~~~~~~~~~~ * fix: compilation warnings In file included from qt/paymentserver.cpp:10: ./qt/paymentserver.h: In constructor ‘PaymentServer::PaymentServer(QObject*, bool)’: ./qt/paymentserver.h:156:28: warning: ‘PaymentServer::netManager’ will be initialized after [-Wreorder] QNetworkAccessManager* netManager; // Used to fetch payment requests ^~~~~~~~~~ ./qt/paymentserver.h:147:19: warning: ‘OptionsModel* PaymentServer::optionsModel’ [-Wreorder] OptionsModel *optionsModel; ^~~~~~~~~~~~ qt/paymentserver.cpp:197:1: warning: when initialized here [-Wreorder] PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) : ^~~~~~~~~~~~~
This commit is contained in:
parent
49bd9bdc1b
commit
40c259bdf3
@ -18,8 +18,9 @@ std::string NumberToString(T Number){
|
|||||||
|
|
||||||
static void int_atoi(benchmark::Bench& bench)
|
static void int_atoi(benchmark::Bench& bench)
|
||||||
{
|
{
|
||||||
|
int value;
|
||||||
bench.run([&] {
|
bench.run([&] {
|
||||||
atoi("1");
|
value = atoi("1");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,8 +154,8 @@ struct Aggregator : public std::enable_shared_from_this<Aggregator<T>> {
|
|||||||
bool _parallel,
|
bool _parallel,
|
||||||
ctpl::thread_pool& _workerPool,
|
ctpl::thread_pool& _workerPool,
|
||||||
DoneCallback _doneCallback) :
|
DoneCallback _doneCallback) :
|
||||||
workerPool(_workerPool),
|
|
||||||
parallel(_parallel),
|
parallel(_parallel),
|
||||||
|
workerPool(_workerPool),
|
||||||
doneCallback(std::move(_doneCallback))
|
doneCallback(std::move(_doneCallback))
|
||||||
{
|
{
|
||||||
inputVec = std::make_shared<std::vector<const T*> >(count);
|
inputVec = std::make_shared<std::vector<const T*> >(count);
|
||||||
@ -342,7 +342,7 @@ struct VectorAggregator : public std::enable_shared_from_this<VectorAggregator<T
|
|||||||
bool parallel;
|
bool parallel;
|
||||||
ctpl::thread_pool& workerPool;
|
ctpl::thread_pool& workerPool;
|
||||||
|
|
||||||
std::atomic<size_t> doneCount;
|
std::atomic<size_t> doneCount{0};
|
||||||
|
|
||||||
VectorPtrType result;
|
VectorPtrType result;
|
||||||
size_t vecSize;
|
size_t vecSize;
|
||||||
@ -351,13 +351,12 @@ struct VectorAggregator : public std::enable_shared_from_this<VectorAggregator<T
|
|||||||
size_t _start, size_t _count,
|
size_t _start, size_t _count,
|
||||||
bool _parallel, ctpl::thread_pool& _workerPool,
|
bool _parallel, ctpl::thread_pool& _workerPool,
|
||||||
DoneCallback _doneCallback) :
|
DoneCallback _doneCallback) :
|
||||||
|
doneCallback(std::move(_doneCallback)),
|
||||||
vecs(_vecs),
|
vecs(_vecs),
|
||||||
parallel(_parallel),
|
|
||||||
start(_start),
|
start(_start),
|
||||||
count(_count),
|
count(_count),
|
||||||
workerPool(_workerPool),
|
parallel(_parallel),
|
||||||
doneCallback(std::move(_doneCallback)),
|
workerPool(_workerPool)
|
||||||
doneCount(0)
|
|
||||||
{
|
{
|
||||||
assert(!vecs.empty());
|
assert(!vecs.empty());
|
||||||
vecSize = vecs[0]->size();
|
vecSize = vecs[0]->size();
|
||||||
@ -417,7 +416,7 @@ struct ContributionVerifier : public std::enable_shared_from_this<ContributionVe
|
|||||||
|
|
||||||
ctpl::thread_pool& workerPool;
|
ctpl::thread_pool& workerPool;
|
||||||
|
|
||||||
size_t batchCount;
|
size_t batchCount{1};
|
||||||
size_t verifyCount;
|
size_t verifyCount;
|
||||||
|
|
||||||
std::vector<BatchState> batchStates;
|
std::vector<BatchState> batchStates;
|
||||||
@ -435,9 +434,8 @@ struct ContributionVerifier : public std::enable_shared_from_this<ContributionVe
|
|||||||
parallel(_parallel),
|
parallel(_parallel),
|
||||||
aggregated(_aggregated),
|
aggregated(_aggregated),
|
||||||
workerPool(_workerPool),
|
workerPool(_workerPool),
|
||||||
doneCallback(std::move(_doneCallback)),
|
verifyCount(_vvecs.size()),
|
||||||
batchCount(1),
|
doneCallback(std::move(_doneCallback))
|
||||||
verifyCount(_vvecs.size())
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,14 +180,14 @@ private:
|
|||||||
|
|
||||||
bool fMixing{false};
|
bool fMixing{false};
|
||||||
|
|
||||||
int nCachedLastSuccessBlock;
|
int nCachedLastSuccessBlock{0};
|
||||||
int nMinBlocksToWait; // how many blocks to wait for after one successful mixing tx in non-multisession mode
|
int nMinBlocksToWait{1}; // how many blocks to wait for after one successful mixing tx in non-multisession mode
|
||||||
std::string strAutoDenomResult;
|
std::string strAutoDenomResult;
|
||||||
|
|
||||||
CWallet& mixingWallet;
|
CWallet& mixingWallet;
|
||||||
|
|
||||||
// Keep track of current block height
|
// Keep track of current block height
|
||||||
int nCachedBlockHeight;
|
int nCachedBlockHeight{0};
|
||||||
|
|
||||||
bool WaitForAnotherBlock() const;
|
bool WaitForAnotherBlock() const;
|
||||||
|
|
||||||
@ -195,25 +195,15 @@ private:
|
|||||||
bool CheckAutomaticBackup();
|
bool CheckAutomaticBackup();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int nCachedNumBlocks; // used for the overview screen
|
int nCachedNumBlocks{std::numeric_limits<int>::max()}; // used for the overview screen
|
||||||
bool fCreateAutoBackups; // builtin support for automatic backups
|
bool fCreateAutoBackups{true}; // builtin support for automatic backups
|
||||||
|
|
||||||
CCoinJoinClientManager() = delete;
|
CCoinJoinClientManager() = delete;
|
||||||
CCoinJoinClientManager(CCoinJoinClientManager const&) = delete;
|
CCoinJoinClientManager(CCoinJoinClientManager const&) = delete;
|
||||||
CCoinJoinClientManager& operator=(CCoinJoinClientManager const&) = delete;
|
CCoinJoinClientManager& operator=(CCoinJoinClientManager const&) = delete;
|
||||||
|
|
||||||
explicit CCoinJoinClientManager(CWallet& wallet) :
|
explicit CCoinJoinClientManager(CWallet& wallet) :
|
||||||
vecMasternodesUsed(),
|
mixingWallet(wallet) {}
|
||||||
deqSessions(),
|
|
||||||
nCachedLastSuccessBlock(0),
|
|
||||||
nMinBlocksToWait(1),
|
|
||||||
strAutoDenomResult(),
|
|
||||||
nCachedBlockHeight(0),
|
|
||||||
nCachedNumBlocks(std::numeric_limits<int>::max()),
|
|
||||||
fCreateAutoBackups(true),
|
|
||||||
mixingWallet(wallet)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, CConnman& connman, bool enable_bip61);
|
void ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, CConnman& connman, bool enable_bip61);
|
||||||
|
|
||||||
|
@ -188,7 +188,6 @@ public:
|
|||||||
class WalletImpl : public Wallet
|
class WalletImpl : public Wallet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CoinJoinImpl m_coinjoin;
|
|
||||||
|
|
||||||
explicit WalletImpl(const std::shared_ptr<CWallet>& wallet) : m_wallet(wallet), m_coinjoin(wallet) {}
|
explicit WalletImpl(const std::shared_ptr<CWallet>& wallet) : m_wallet(wallet), m_coinjoin(wallet) {}
|
||||||
|
|
||||||
@ -592,6 +591,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<CWallet> m_wallet;
|
std::shared_ptr<CWallet> m_wallet;
|
||||||
|
CoinJoinImpl m_coinjoin;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WalletClientImpl : public ChainClient
|
class WalletClientImpl : public ChainClient
|
||||||
|
@ -21,8 +21,8 @@ namespace llmq
|
|||||||
{
|
{
|
||||||
|
|
||||||
CDKGPendingMessages::CDKGPendingMessages(size_t _maxMessagesPerNode, int _invType) :
|
CDKGPendingMessages::CDKGPendingMessages(size_t _maxMessagesPerNode, int _invType) :
|
||||||
maxMessagesPerNode(_maxMessagesPerNode),
|
invType(_invType),
|
||||||
invType(_invType)
|
maxMessagesPerNode(_maxMessagesPerNode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,13 +20,7 @@
|
|||||||
|
|
||||||
AppearanceWidget::AppearanceWidget(QWidget* parent) :
|
AppearanceWidget::AppearanceWidget(QWidget* parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::AppearanceWidget),
|
ui{new Ui::AppearanceWidget()}
|
||||||
fAcceptChanges(false),
|
|
||||||
prevTheme(GUIUtil::getActiveTheme()),
|
|
||||||
prevFontFamily(GUIUtil::getFontFamily()),
|
|
||||||
prevScale(GUIUtil::getFontScale()),
|
|
||||||
prevWeightNormal(GUIUtil::getFontWeightNormal()),
|
|
||||||
prevWeightBold(GUIUtil::getFontWeightBold())
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -46,12 +46,12 @@ private:
|
|||||||
Ui::AppearanceWidget* ui;
|
Ui::AppearanceWidget* ui;
|
||||||
QDataWidgetMapper* mapper;
|
QDataWidgetMapper* mapper;
|
||||||
OptionsModel* model;
|
OptionsModel* model;
|
||||||
bool fAcceptChanges;
|
bool fAcceptChanges{false};
|
||||||
QString prevTheme;
|
QString prevTheme{GUIUtil::getActiveTheme()};
|
||||||
int prevScale;
|
int prevScale{GUIUtil::getFontScale()};
|
||||||
GUIUtil::FontFamily prevFontFamily;
|
GUIUtil::FontFamily prevFontFamily{GUIUtil::getFontFamily()};
|
||||||
QFont::Weight prevWeightNormal;
|
QFont::Weight prevWeightNormal{GUIUtil::getFontWeightNormal()};
|
||||||
QFont::Weight prevWeightBold;
|
QFont::Weight prevWeightBold{GUIUtil::getFontWeightBold()};
|
||||||
|
|
||||||
void updateWeightSlider(bool fForce = false);
|
void updateWeightSlider(bool fForce = false);
|
||||||
};
|
};
|
||||||
|
@ -81,8 +81,8 @@ const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
|
|||||||
BitcoinGUI::BitcoinGUI(interfaces::Node& node, const NetworkStyle* networkStyle, QWidget* parent) :
|
BitcoinGUI::BitcoinGUI(interfaces::Node& node, const NetworkStyle* networkStyle, QWidget* parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
m_node(node),
|
m_node(node),
|
||||||
m_network_style(networkStyle),
|
trayIconMenu{new QMenu()},
|
||||||
trayIconMenu{new QMenu()}
|
m_network_style(networkStyle)
|
||||||
{
|
{
|
||||||
GUIUtil::loadTheme(true);
|
GUIUtil::loadTheme(true);
|
||||||
|
|
||||||
|
@ -44,13 +44,7 @@ public:
|
|||||||
|
|
||||||
MasternodeList::MasternodeList(QWidget* parent) :
|
MasternodeList::MasternodeList(QWidget* parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::MasternodeList),
|
ui(new Ui::MasternodeList)
|
||||||
clientModel(0),
|
|
||||||
walletModel(0),
|
|
||||||
fFilterUpdatedDIP3(true),
|
|
||||||
nTimeFilterUpdatedDIP3(0),
|
|
||||||
nTimeUpdatedDIP3(0),
|
|
||||||
mnListChanged(true)
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -56,21 +56,21 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QMenu* contextMenuDIP3;
|
QMenu* contextMenuDIP3;
|
||||||
int64_t nTimeFilterUpdatedDIP3;
|
int64_t nTimeFilterUpdatedDIP3{0};
|
||||||
int64_t nTimeUpdatedDIP3;
|
int64_t nTimeUpdatedDIP3{0};
|
||||||
bool fFilterUpdatedDIP3;
|
bool fFilterUpdatedDIP3{true};
|
||||||
|
|
||||||
QTimer* timer;
|
QTimer* timer;
|
||||||
Ui::MasternodeList* ui;
|
Ui::MasternodeList* ui;
|
||||||
ClientModel* clientModel;
|
ClientModel* clientModel{nullptr};
|
||||||
WalletModel* walletModel;
|
WalletModel* walletModel{nullptr};
|
||||||
|
|
||||||
// Protects tableWidgetMasternodesDIP3
|
// Protects tableWidgetMasternodesDIP3
|
||||||
CCriticalSection cs_dip3list;
|
CCriticalSection cs_dip3list;
|
||||||
|
|
||||||
QString strCurrentFilterDIP3;
|
QString strCurrentFilterDIP3;
|
||||||
|
|
||||||
bool mnListChanged;
|
bool mnListChanged{true};
|
||||||
|
|
||||||
CDeterministicMNCPtr GetSelectedDIP3MN();
|
CDeterministicMNCPtr GetSelectedDIP3MN();
|
||||||
|
|
||||||
|
@ -196,11 +196,11 @@ bool PaymentServer::ipcSendCommandLine()
|
|||||||
|
|
||||||
PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) :
|
PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
saveURIs(true),
|
|
||||||
uriServer(nullptr),
|
|
||||||
#ifdef ENABLE_BIP70
|
#ifdef ENABLE_BIP70
|
||||||
netManager(nullptr),
|
netManager(nullptr),
|
||||||
#endif
|
#endif
|
||||||
|
saveURIs(true),
|
||||||
|
uriServer(nullptr),
|
||||||
optionsModel(nullptr)
|
optionsModel(nullptr)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_BIP70
|
#ifdef ENABLE_BIP70
|
||||||
|
@ -142,10 +142,6 @@ protected:
|
|||||||
bool eventFilter(QObject *object, QEvent *event) override;
|
bool eventFilter(QObject *object, QEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool saveURIs; // true during startup
|
|
||||||
QLocalServer* uriServer;
|
|
||||||
OptionsModel *optionsModel;
|
|
||||||
|
|
||||||
#ifdef ENABLE_BIP70
|
#ifdef ENABLE_BIP70
|
||||||
static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request);
|
static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request);
|
||||||
bool processPaymentRequest(const PaymentRequestPlus& request, SendCoinsRecipient& recipient);
|
bool processPaymentRequest(const PaymentRequestPlus& request, SendCoinsRecipient& recipient);
|
||||||
@ -155,6 +151,10 @@ private:
|
|||||||
void initNetManager();
|
void initNetManager();
|
||||||
QNetworkAccessManager* netManager; // Used to fetch payment requests
|
QNetworkAccessManager* netManager; // Used to fetch payment requests
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool saveURIs; // true during startup
|
||||||
|
QLocalServer* uriServer;
|
||||||
|
OptionsModel *optionsModel;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BITCOIN_QT_PAYMENTSERVER_H
|
#endif // BITCOIN_QT_PAYMENTSERVER_H
|
||||||
|
@ -439,7 +439,7 @@ static UniValue masternode_payments(const JSONRPCRequest& request)
|
|||||||
// A temporary vector which is used to sort results properly (there is no "reverse" in/for UniValue)
|
// A temporary vector which is used to sort results properly (there is no "reverse" in/for UniValue)
|
||||||
std::vector<UniValue> vecPayments;
|
std::vector<UniValue> vecPayments;
|
||||||
|
|
||||||
while (vecPayments.size() < std::abs(nCount) != 0 && pindex != nullptr) {
|
while (vecPayments.size() < std::abs(nCount) && pindex != nullptr) {
|
||||||
|
|
||||||
CBlock block;
|
CBlock block;
|
||||||
if (!ReadBlockFromDisk(block, pindex, Params().GetConsensus())) {
|
if (!ReadBlockFromDisk(block, pindex, Params().GetConsensus())) {
|
||||||
|
@ -11,15 +11,6 @@
|
|||||||
|
|
||||||
BOOST_FIXTURE_TEST_SUITE(cachemultimap_tests, BasicTestingSetup)
|
BOOST_FIXTURE_TEST_SUITE(cachemultimap_tests, BasicTestingSetup)
|
||||||
|
|
||||||
static void DumpMap(const CacheMultiMap<int,int>& cmmap)
|
|
||||||
{
|
|
||||||
const CacheMultiMap<int,int>::list_t& listItems = cmmap.GetItemList();
|
|
||||||
for(CacheMultiMap<int,int>::list_cit it = listItems.begin(); it != listItems.end(); ++it) {
|
|
||||||
const CacheItem<int,int>& item = *it;
|
|
||||||
std::cout << item.key << " : " << item.value << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool Compare(const CacheMultiMap<int,int>& cmmap1, const CacheMultiMap<int,int>& cmmap2)
|
static bool Compare(const CacheMultiMap<int,int>& cmmap1, const CacheMultiMap<int,int>& cmmap2)
|
||||||
{
|
{
|
||||||
if(cmmap1.GetMaxSize() != cmmap2.GetMaxSize()) {
|
if(cmmap1.GetMaxSize() != cmmap2.GetMaxSize()) {
|
||||||
|
@ -162,8 +162,6 @@ CBlockPolicyEstimator feeEstimator;
|
|||||||
CTxMemPool mempool(&feeEstimator);
|
CTxMemPool mempool(&feeEstimator);
|
||||||
std::atomic_bool g_is_mempool_loaded{false};
|
std::atomic_bool g_is_mempool_loaded{false};
|
||||||
|
|
||||||
static void CheckBlockIndex(const Consensus::Params& consensusParams);
|
|
||||||
|
|
||||||
// Internal stuff
|
// Internal stuff
|
||||||
namespace {
|
namespace {
|
||||||
CBlockIndex* pindexBestInvalid = nullptr;
|
CBlockIndex* pindexBestInvalid = nullptr;
|
||||||
|
@ -263,9 +263,6 @@ void PruneBlockFilesManual(int nManualPruneHeight);
|
|||||||
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx,
|
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx,
|
||||||
bool* pfMissingInputs, bool bypass_limits,
|
bool* pfMissingInputs, bool bypass_limits,
|
||||||
const CAmount nAbsurdFee, bool test_accept=false) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
const CAmount nAbsurdFee, bool test_accept=false) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||||
static bool AcceptToMemoryPoolWithTime(const CChainParams& chainparams, CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx,
|
|
||||||
bool* pfMissingInputs, int64_t nAcceptTime, bool bypass_limits,
|
|
||||||
const CAmount nAbsurdFee, bool test_accept = false);
|
|
||||||
|
|
||||||
bool GetUTXOCoin(const COutPoint& outpoint, Coin& coin);
|
bool GetUTXOCoin(const COutPoint& outpoint, Coin& coin);
|
||||||
int GetUTXOHeight(const COutPoint& outpoint);
|
int GetUTXOHeight(const COutPoint& outpoint);
|
||||||
|
Loading…
Reference in New Issue
Block a user