// Copyright (c) 2022-2024 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CONTEXT_H #define BITCOIN_CONTEXT_H #include #include class ArgsManager; class ChainstateManager; class CTxMemPool; class CBlockPolicyEstimator; struct LLMQContext; struct NodeContext; struct WalletContext; using CoreContext = std::variant, std::reference_wrapper, std::reference_wrapper, std::reference_wrapper, std::reference_wrapper, std::reference_wrapper, std::reference_wrapper>; template T* GetContext(const CoreContext& context) noexcept { return std::holds_alternative>(context) ? &std::get>(context).get() : nullptr; } #endif // BITCOIN_CONTEXT_H