mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
State synchronization logic (#67)
* Added flat buffer state message request * Added state vote * Added state to ledger history and did necessary changes * Completed receiveing state request * State read/write helpers. * Added new fbs schema * Added more state_store helper methods. * Started processing response * Fixed compile errors * Added get file length. * Handled state content response * Statefs code cleanup and fixes. * Completed response handling * Completed changes in handling state response * State sync integration fixes. * Fuse mount waiting logic. * Fixed state syncing issues * state sync fixes * fixes * State sync fixes. * Fixed fs entries retrieval issues. * changed desync logic * Added directory helper functions. * Handled return statemetns from statefs * Fixed state folder deletion. * handled errors from statefs * Working for small files * Got state sync working. * Removed cout. * Fixed catering for stae issue * Fixed block hash map flatbuf issue. * Added expected hash * Added helpers for expected hash comparison. * Improved state req/resp awaiting logic. * Fixes. * Fixes. * Block request ordering fix. * Removed couts * Closed non-closed file descriptors * Minor fixes. * Cluster create script changes. * Fixed reset time off issue.
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -79,7 +79,7 @@ void signal_handler(int signum)
|
||||
*/
|
||||
void boost::throw_exception(std::exception const &e)
|
||||
{
|
||||
LOG_ERR << "Boost error:" << e.what();
|
||||
std::cerr << "Boost error:" << e.what() << "\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -97,16 +97,16 @@ void std_terminate() noexcept
|
||||
}
|
||||
catch (std::exception &ex)
|
||||
{
|
||||
LOG_ERR << "std error: " << ex.what();
|
||||
std::cerr << "std error: " << ex.what() << "\n";
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
LOG_ERR << "std error: Terminated due to unknown exception";
|
||||
std::cerr << "std error: Terminated due to unknown exception" << "\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERR << "std error: Terminated due to unknown reason";
|
||||
std::cerr << "std error: Terminated due to unknown reason" << "\n";
|
||||
}
|
||||
|
||||
exit(1);
|
||||
@@ -170,11 +170,11 @@ int main(int argc, char **argv)
|
||||
LOG_INFO << "Operating mode: "
|
||||
<< (conf::cfg.mode == conf::OPERATING_MODE::OBSERVING ? "Observing" : "Proposing");
|
||||
|
||||
statefs::init(conf::ctx.statehistdir);
|
||||
|
||||
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