2020-04-16 13:14:08 -04:00
|
|
|
// Copyright (c) 2016-2020 The Bitcoin Core developers
|
2016-04-18 14:54:57 +02:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2018-03-22 15:19:44 +01:00
|
|
|
#ifndef BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H
|
|
|
|
#define BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H
|
2016-04-18 14:54:57 +02:00
|
|
|
|
2019-11-05 15:18:59 -05:00
|
|
|
#include <test/util/setup_common.h>
|
2016-04-18 14:54:57 +02:00
|
|
|
|
2017-05-30 15:55:17 -04:00
|
|
|
#include <interfaces/chain.h>
|
|
|
|
#include <interfaces/wallet.h>
|
2019-09-17 18:28:03 -04:00
|
|
|
#include <node/context.h>
|
2020-05-11 17:40:21 +02:00
|
|
|
#include <util/check.h>
|
2017-11-18 14:11:34 +01:00
|
|
|
#include <wallet/wallet.h>
|
|
|
|
|
2018-04-02 18:31:40 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2016-04-18 14:54:57 +02:00
|
|
|
/** Testing setup and teardown for wallet.
|
|
|
|
*/
|
2020-05-11 17:40:21 +02:00
|
|
|
struct WalletTestingSetup : public TestingSetup {
|
2017-08-01 12:22:41 +02:00
|
|
|
explicit WalletTestingSetup(const std::string& chainName = CBaseChainParams::MAIN);
|
2017-11-18 14:11:34 +01:00
|
|
|
|
2020-12-07 20:46:03 -05:00
|
|
|
std::unique_ptr<interfaces::WalletClient> m_wallet_client = interfaces::MakeWalletClient(*m_node.chain, *Assert(m_node.args));
|
2017-11-13 21:25:46 -05:00
|
|
|
CWallet m_wallet;
|
2020-03-10 15:46:20 -04:00
|
|
|
std::unique_ptr<interfaces::Handler> m_chain_notifications_handler;
|
2016-04-18 14:54:57 +02:00
|
|
|
};
|
|
|
|
|
2018-03-22 15:19:44 +01:00
|
|
|
#endif // BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H
|