PIVX Core  5.6.99
P2P Digital Currency
wallet_test_fixture.cpp
Go to the documentation of this file.
1 // Copyright (c) 2016-2021 The Bitcoin Core developers
2 // Copyright (c) 2020-2021 The PIVX Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
7 
8 #include "rpc/server.h"
9 #include "wallet/db.h"
10 #include "wallet/rpcwallet.h"
11 #include "wallet/wallet.h"
12 
14  const std::string& wallet_name,
15  std::unique_ptr<WalletDatabase> db) :
16  SaplingTestingSetup(chainName), m_wallet(wallet_name, std::move(db))
17 {
18  bool fFirstRun;
19  m_wallet.LoadWallet(fFirstRun);
21 
23 }
24 
26 {
28 }
29 
30 WalletTestingSetup::WalletTestingSetup(const std::string& chainName) :
31  WalletTestingSetupBase(chainName, "mock", WalletDatabase::CreateMock()) {}
An instance of this class represents one database.
Definition: db.h:105
DBErrors LoadWallet(bool &fFirstRunRet)
Definition: wallet.cpp:3584
Definition: uint256.h:212
void RegisterWalletRPCCommands(CRPCTable &tableRPC)
Definition: rpcwallet.cpp:4853
CRPCTable tableRPC
Definition: server.cpp:565
Testing setup that configures a complete environment for Sapling testing.
Testing setup and teardown for wallet.
WalletTestingSetupBase(const std::string &chainName, const std::string &wallet_name, std::unique_ptr< WalletDatabase > db)
WalletTestingSetup(const std::string &chainName=CBaseChainParams::MAIN)
void UnregisterValidationInterface(CValidationInterface *pwalletIn)
Unregister a wallet from core.
void RegisterValidationInterface(CValidationInterface *pwalletIn)
Register a wallet to receive updates from core.