2019-05-06 14:05:28 -04:00
|
|
|
// Copyright (c) 2016-2019 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-04-11 09:44:10 -04:00
|
|
|
#include <test/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>
|
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.
|
|
|
|
*/
|
|
|
|
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
|
|
|
|
2017-05-30 15:55:17 -04:00
|
|
|
std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain();
|
2017-07-31 11:46:13 -04:00
|
|
|
std::unique_ptr<interfaces::ChainClient> m_chain_client = interfaces::MakeWalletClient(*m_chain, {});
|
2017-11-13 21:25:46 -05:00
|
|
|
CWallet m_wallet;
|
2016-04-18 14:54:57 +02:00
|
|
|
};
|
|
|
|
|
2018-03-22 15:19:44 +01:00
|
|
|
#endif // BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H
|