Fixed segfault with checkpoints loading

Bounds checking on blockchain_storage' m_blocks.size() when validating
against checkpoints.  Also moved initial json & DNS checkpoints load to
after blockchain init.
This commit is contained in:
Thomas Winget 2014-09-27 17:46:12 -04:00
parent b261d9207b
commit 7568f89c55
3 changed files with 10 additions and 2 deletions

View file

@ -221,8 +221,6 @@ int main(int argc, char* argv[])
} else {
ccore.set_checkpoints(std::move(checkpoints));
ccore.set_checkpoints_file_path(checkpoint_json_hashfile_fullpath.string());
res = ccore.update_checkpoints();
CHECK_AND_ASSERT_MES(res, 1, "Failed to load initial checkpoints");
}
cryptonote::t_cryptonote_protocol_handler<cryptonote::core> cprotocol(ccore, NULL);