@@ -66,36 +66,36 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
66
66
{
67
67
SetDataDir (" tempdir" );
68
68
const CChainParams& chainparams = Params ();
69
- // Ideally we'd move all the RPC tests to the functional testing framework
70
- // instead of unit tests, but for now we need these here.
71
-
72
- RegisterAllCoreRPCCommands (tableRPC);
73
- ClearDatadirCache ();
74
-
75
- // We have to run a scheduler thread to prevent ActivateBestChain
76
- // from blocking due to queue overrun.
77
- threadGroup.create_thread (std::bind (&CScheduler::serviceQueue, &scheduler));
78
- GetMainSignals ().RegisterBackgroundSignalScheduler (scheduler);
79
-
80
- mempool.setSanityCheck (1.0 );
81
- pblocktree.reset (new CBlockTreeDB (1 << 20 , true ));
82
- pcoinsdbview.reset (new CCoinsViewDB (1 << 23 , true ));
83
- pcoinsTip.reset (new CCoinsViewCache (pcoinsdbview.get ()));
84
- if (!LoadGenesisBlock (chainparams)) {
85
- throw std::runtime_error (" LoadGenesisBlock failed." );
86
- }
87
- {
88
- CValidationState state;
89
- if (!ActivateBestChain (state, chainparams)) {
90
- throw std::runtime_error (strprintf (" ActivateBestChain failed. (%s)" , FormatStateMessage (state)));
91
- }
92
- }
93
- nScriptCheckThreads = 3 ;
94
- for (int i= 0 ; i < nScriptCheckThreads- 1 ; i++)
95
- threadGroup.create_thread (&ThreadScriptCheck);
96
-
97
- g_banman = MakeUnique<BanMan>(GetDataDir () / " banlist.dat" , nullptr , DEFAULT_MISBEHAVING_BANTIME);
98
- g_connman = MakeUnique<CConnman>(0x1337 , 0x1337 ); // Deterministic randomness for tests.
69
+ // Ideally we'd move all the RPC tests to the functional testing framework
70
+ // instead of unit tests, but for now we need these here.
71
+
72
+ RegisterAllCoreRPCCommands (tableRPC);
73
+ ClearDatadirCache ();
74
+
75
+ // We have to run a scheduler thread to prevent ActivateBestChain
76
+ // from blocking due to queue overrun.
77
+ threadGroup.create_thread (std::bind (&CScheduler::serviceQueue, &scheduler));
78
+ GetMainSignals ().RegisterBackgroundSignalScheduler (scheduler);
79
+
80
+ mempool.setSanityCheck (1.0 );
81
+ pblocktree.reset (new CBlockTreeDB (1 << 20 , true ));
82
+ pcoinsdbview.reset (new CCoinsViewDB (1 << 23 , true ));
83
+ pcoinsTip.reset (new CCoinsViewCache (pcoinsdbview.get ()));
84
+ if (!LoadGenesisBlock (chainparams)) {
85
+ throw std::runtime_error (" LoadGenesisBlock failed." );
86
+ }
87
+
88
+ CValidationState state;
89
+ if (!ActivateBestChain (state, chainparams)) {
90
+ throw std::runtime_error (strprintf (" ActivateBestChain failed. (%s)" , FormatStateMessage (state)));
91
+ }
92
+
93
+ nScriptCheckThreads = 3 ;
94
+ for (int i = 0 ; i < nScriptCheckThreads - 1 ; i++)
95
+ threadGroup.create_thread (&ThreadScriptCheck);
96
+
97
+ g_banman = MakeUnique<BanMan>(GetDataDir () / " banlist.dat" , nullptr , DEFAULT_MISBEHAVING_BANTIME);
98
+ g_connman = MakeUnique<CConnman>(0x1337 , 0x1337 ); // Deterministic randomness for tests.
99
99
}
100
100
101
101
TestingSetup::~TestingSetup ()
0 commit comments