dash/src/llmq
PastaPastaPasta 40c259bdf3
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) :
 ^~~~~~~~~~~~~
2021-12-01 22:59:34 +03:00
..
blockprocessor.cpp refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
blockprocessor.h refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
chainlocks.cpp refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
chainlocks.h refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
commitment.cpp refactor: minimize passing around llmqType just to search for LLMQParams (#4551) 2021-10-28 22:10:43 +03:00
commitment.h refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
debug.cpp refactor: minimize passing around llmqType just to search for LLMQParams (#4551) 2021-10-28 22:10:43 +03:00
debug.h refactor: minimize passing around llmqType just to search for LLMQParams (#4551) 2021-10-28 22:10:43 +03:00
dkgsession.cpp refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
dkgsession.h fix: add missing optional include (#4595) 2021-11-30 08:03:17 +03:00
dkgsessionhandler.cpp fix: resolve numerous compilation warnings under -Wall (#4599) 2021-12-01 22:59:34 +03:00
dkgsessionhandler.h refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
dkgsessionmgr.cpp refactor: minimize passing around llmqType just to search for LLMQParams (#4551) 2021-10-28 22:10:43 +03:00
dkgsessionmgr.h Rename variables for better clarity (#4544) 2021-10-26 12:08:38 -04:00
init.cpp refactor: llmq/quorums_*[cpp/h] --> llmq/*.[cpp/h] 2021-10-06 09:04:45 +05:30
init.h refactor: llmq/quorums_*[cpp/h] --> llmq/*.[cpp/h] 2021-10-06 09:04:45 +05:30
instantsend.cpp instantsend: Do not consider islocks with unknown txes as complete (#4147) 2021-11-30 14:14:08 +03:00
instantsend.h instantsend: Do not consider islocks with unknown txes as complete (#4147) 2021-11-30 14:14:08 +03:00
params.h refactor: more LLMQ params related refactoring (#4517) 2021-10-15 13:28:19 +03:00
quorums.cpp refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
quorums.h refactor: Misc LLMQ refactoring (#4590) 2021-11-29 08:12:09 +03:00
signing_shares.cpp refactor: misc refactoring prefer std algorithm, range for loops; fix broken loop (#4593) 2021-11-30 08:03:08 +03:00
signing_shares.h refactor: misc refactoring prefer std algorithm, range for loops; fix broken loop (#4593) 2021-11-30 08:03:08 +03:00
signing.cpp refactor: Include adjustments (#4526) 2021-10-25 16:55:34 +03:00
signing.h Simplify the interface for CRecoveredSig (#4587) 2021-11-29 08:00:47 +03:00
utils.cpp refactor: more llmq refactoring (#4552) 2021-10-28 22:11:34 +03:00
utils.h refactor: more llmq refactoring (#4552) 2021-10-28 22:11:34 +03:00