PIVX Core  5.6.99
P2P Digital Currency
init.h
Go to the documentation of this file.
1 // Copyright (c) 2021-2022 The PIVX Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or https://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_TIERTWO_INIT_H
6 #define PIVX_TIERTWO_INIT_H
7 
8 #include <string>
9 #include "fs.h"
10 
11 static const bool DEFAULT_MASTERNODE = false;
12 static const bool DEFAULT_MNCONFLOCK = true;
13 
14 class CScheduler;
15 namespace boost {
16  class thread_group;
17 }
18 
19 std::string GetTierTwoHelpString(bool showDebug);
20 
23 
26 
29 
32 
34 void InitTierTwoChainTip();
35 
37 bool LoadTierTwo(int chain_active_height, bool load_cache_files);
38 
41 
43 void DumpTierTwo();
44 
45 void SetBudgetFinMode(const std::string& mode);
46 
48 bool InitActiveMN();
49 
52 
54 void StopTierTwoThreads();
55 
57 void DeleteTierTwo();
58 
60 void InterruptTierTwo();
61 
62 
63 #endif // PIVX_TIERTWO_INIT_H
bool InitActiveMN()
Initialize the active Masternode manager.
Definition: init.cpp:215
void InterruptTierTwo()
Interrupt tier two threads.
Definition: init.cpp:332
void ResetTierTwoInterfaces()
Resets the interfaces objects.
Definition: init.cpp:51
std::string GetTierTwoHelpString(bool showDebug)
Definition: init.cpp:27
void SetBudgetFinMode(const std::string &mode)
Definition: init.cpp:209
void InitTierTwoChainTip()
Initialize chain tip.
Definition: init.cpp:80
void RegisterTierTwoValidationInterface()
Register all tier two objects.
Definition: init.cpp:193
void InitTierTwoInterfaces()
Init the interfaces objects.
Definition: init.cpp:45
void InitTierTwoPreChainLoad(bool fReindex)
Inits the tier two global objects.
Definition: init.cpp:65
void StopTierTwoThreads()
Stops tier two workers.
Definition: init.cpp:320
bool LoadTierTwo(int chain_active_height, bool load_cache_files)
Loads from disk all the tier two related objects.
Definition: init.cpp:100
void StartTierTwoThreadsAndScheduleJobs(boost::thread_group &threadGroup, CScheduler &scheduler)
Starts tier two threads and jobs.
Definition: init.cpp:303
void DeleteTierTwo()
Cleans manager and worker objects pointers.
Definition: init.cpp:325
void DumpTierTwo()
Dump tier two managers to disk.
Definition: init.cpp:200
void InitTierTwoPostCoinsCacheLoad(CScheduler *scheduler)
Inits the tier two global objects that require access to the coins tip cache.
Definition: init.cpp:74
std::atomic< bool > fReindex
Definition: validation.cpp:95
CScheduler scheduler
boost::thread_group threadGroup