mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Contract state monitoring and rollback infrastructure. (#61)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "usr/usr.hpp"
|
||||
#include "p2p/p2p.hpp"
|
||||
#include "cons/cons.hpp"
|
||||
#include "statefs/state_common.hpp"
|
||||
|
||||
/**
|
||||
* Parses CLI args and extracts hot pocket command and parameters given.
|
||||
@@ -35,7 +36,7 @@ int parse_cmd(int argc, char **argv)
|
||||
{
|
||||
// We inform the conf subsystem to populate the contract directory context values
|
||||
// based on the directory argument from the command line.
|
||||
conf::set_contract_dir_paths(argv[2]);
|
||||
conf::set_contract_dir_paths(argv[0], argv[2]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -114,7 +115,7 @@ void std_terminate() noexcept
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
//seed rand
|
||||
srand(time(0));
|
||||
srand(time(0));
|
||||
|
||||
// Register exception handler for std exceptions.
|
||||
std::set_terminate(&std_terminate);
|
||||
@@ -172,6 +173,8 @@ int main(int argc, char **argv)
|
||||
if (p2p::init() != 0 || usr::init() != 0 || cons::init() != 0)
|
||||
return -1;
|
||||
|
||||
statefs::init(conf::ctx.statehistdir);
|
||||
|
||||
// After initializing primary subsystems, register the SIGINT handler.
|
||||
signal(SIGINT, signal_handler);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user