mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-23 14:10:15 +01:00
tests: move pwalletMain to wallet test fixture
Scope the variable instead of using an external global; this is how test fixtures are intended to be used. Followup to #11713.
This commit is contained in:
@@ -6,9 +6,6 @@
|
||||
|
||||
#include <rpc/server.h>
|
||||
#include <wallet/db.h>
|
||||
#include <wallet/wallet.h>
|
||||
|
||||
std::unique_ptr<CWallet> pwalletMain;
|
||||
|
||||
WalletTestingSetup::WalletTestingSetup(const std::string& chainName):
|
||||
TestingSetup(chainName)
|
||||
@@ -27,7 +24,6 @@ WalletTestingSetup::WalletTestingSetup(const std::string& chainName):
|
||||
WalletTestingSetup::~WalletTestingSetup()
|
||||
{
|
||||
UnregisterValidationInterface(pwalletMain.get());
|
||||
pwalletMain.reset();
|
||||
|
||||
bitdb.Flush(true);
|
||||
bitdb.Reset();
|
||||
|
||||
Reference in New Issue
Block a user