diff options
author | Tomer Konforty <tomerk@kon40.com> | 2014-09-24 17:36:04 +0300 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-09-25 00:00:44 +0200 |
commit | 06a4578bf253cfde6f0ab352994b3aadf61ec372 (patch) | |
tree | c96190c1c5b4b112f7086a9071ac4d7f2eeb6b30 /src/daemon/daemon.cpp | |
parent | checkpoint (diff) | |
download | monero-06a4578bf253cfde6f0ab352994b3aadf61ec372.tar.xz |
Added ability to read chechpoint hashes from json file in data folder
Diffstat (limited to '')
-rw-r--r-- | src/daemon/daemon.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 5eda6cb69..5c209482e 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -44,6 +44,7 @@ using namespace epee; #include "p2p/net_node.h" #include "cryptonote_config.h" #include "cryptonote_core/checkpoints_create.h" +#include "cryptonote_core/checkpoints.h" #include "cryptonote_core/cryptonote_core.h" #include "rpc/core_rpc_server.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h" @@ -203,6 +204,10 @@ int main(int argc, char* argv[]) cryptonote::checkpoints checkpoints; res = cryptonote::create_checkpoints(checkpoints); CHECK_AND_ASSERT_MES(res, 1, "Failed to initialize checkpoints"); + boost::filesystem::path json(JSON_HASH_FILE_NAME); + boost::filesystem::path checkpoint_json_hashfile_fullpath = data_dir / json; + res = cryptonote::load_checkpoins_from_json(checkpoints, checkpoint_json_hashfile_fullpath.string().c_str()); + CHECK_AND_ASSERT_MES(res, 1, "Failed to load initial checkpoints"); //create objects and link them cryptonote::core ccore(NULL); |