mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
merge bitcoin#19188: Avoid overwriting the NodeContext member of the testing setup [-Wshadow-field]
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
This commit is contained in:
parent
d44ff7dc9d
commit
63b9860cf2
@ -398,6 +398,7 @@ if test "x$enable_werror" = "xyes"; then
|
||||
AC_MSG_ERROR("enable-werror set but -Werror is not usable")
|
||||
fi
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=shadow-field],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=shadow-field"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=switch],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=switch"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=thread-safety],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=unused-variable],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unused-variable"],,[[$CXXFLAG_WERROR]])
|
||||
@ -416,6 +417,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wextra],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wextra"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wvla],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wshadow-field],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-field"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wswitch],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wswitch"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wthread-safety],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"],,[[$CXXFLAG_WERROR]])
|
||||
|
@ -45,11 +45,11 @@ public:
|
||||
return quorumMember;
|
||||
}
|
||||
|
||||
CSigShare(Consensus::LLMQType llmqType, const uint256 &quorumHash, const uint256 &id, const uint256 &msgHash,
|
||||
uint16_t quorumMember, const CBLSLazySignature &sigShare) :
|
||||
CSigBase(llmqType, quorumHash, id, msgHash),
|
||||
quorumMember(quorumMember),
|
||||
sigShare(sigShare) {};
|
||||
CSigShare(Consensus::LLMQType _llmqType, const uint256& _quorumHash, const uint256& _id, const uint256& _msgHash,
|
||||
uint16_t _quorumMember, const CBLSLazySignature& _sigShare) :
|
||||
CSigBase(_llmqType, _quorumHash, _id, _msgHash),
|
||||
quorumMember(_quorumMember),
|
||||
sigShare(_sigShare) {};
|
||||
|
||||
// This should only be used for serialization
|
||||
CSigShare() = default;
|
||||
@ -83,8 +83,8 @@ private:
|
||||
uint32_t sessionId{UNINITIALIZED_SESSION_ID};
|
||||
|
||||
public:
|
||||
CSigSesAnn(uint32_t sessionId, Consensus::LLMQType llmqType, const uint256& quorumHash, const uint256& id,
|
||||
const uint256& msgHash) : CSigBase(llmqType, quorumHash, id, msgHash), sessionId(sessionId) {};
|
||||
CSigSesAnn(uint32_t _sessionId, Consensus::LLMQType _llmqType, const uint256& _quorumHash, const uint256& _id,
|
||||
const uint256& _msgHash) : CSigBase(_llmqType, _quorumHash, _id, _msgHash), sessionId(_sessionId) {};
|
||||
// ONLY FOR SERIALIZATION
|
||||
CSigSesAnn() = default;
|
||||
|
||||
|
@ -18,7 +18,6 @@ struct InitWalletDirTestingSetup: public BasicTestingSetup {
|
||||
fs::path m_datadir;
|
||||
fs::path m_cwd;
|
||||
std::map<std::string, fs::path> m_walletdir_path_cases;
|
||||
NodeContext m_node;
|
||||
std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(m_node);
|
||||
std::unique_ptr<interfaces::ChainClient> m_chain_client;
|
||||
};
|
||||
|
@ -19,7 +19,6 @@
|
||||
struct WalletTestingSetup: public TestingSetup {
|
||||
explicit WalletTestingSetup(const std::string& chainName = CBaseChainParams::MAIN);
|
||||
|
||||
NodeContext m_node;
|
||||
std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(m_node);
|
||||
std::unique_ptr<interfaces::ChainClient> m_chain_client = interfaces::MakeWalletClient(*m_chain, {});
|
||||
CWallet m_wallet;
|
||||
|
@ -423,7 +423,6 @@ public:
|
||||
return it->second;
|
||||
}
|
||||
|
||||
NodeContext m_node;
|
||||
std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(m_node);
|
||||
std::unique_ptr<CWallet> wallet;
|
||||
};
|
||||
@ -530,7 +529,6 @@ public:
|
||||
BOOST_CHECK_EQUAL(result.status, CWallet::ScanResult::SUCCESS);
|
||||
}
|
||||
|
||||
NodeContext m_node;
|
||||
std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(m_node);
|
||||
|
||||
~CreateTransactionTestSetup()
|
||||
|
Loading…
Reference in New Issue
Block a user