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
+4
View File
@@ -150,6 +150,10 @@ namespace cryptonote
r = m_blockchain_storage.init(m_config_folder, testnet);
CHECK_AND_ASSERT_MES(r, false, "Failed to initialize blockchain storage");
// load json & DNS checkpoints, and verify them
// with respect to what blocks we already have
update_checkpoints();
r = m_miner.init(vm, testnet);
CHECK_AND_ASSERT_MES(r, false, "Failed to initialize blockchain storage");