From 986b087be5a96b211578a089df2fb69abc565113 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Wed, 19 Oct 2016 20:32:16 -0700 Subject: [PATCH] Adapt database initialization to library changes. --- console/executor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/console/executor.cpp b/console/executor.cpp index 3c63ed76..44e4ee64 100644 --- a/console/executor.cpp +++ b/console/executor.cpp @@ -35,6 +35,7 @@ namespace server { using boost::format; using namespace boost; using namespace boost::system; +using namespace bc::chain; using namespace bc::config; using namespace bc::database; using namespace bc::network; @@ -109,9 +110,10 @@ bool executor::do_initchain() // Unfortunately we are still limited to a choice of hardcoded chains. const auto genesis = metadata_.configured.chain.use_testnet_rules ? - chain::block::genesis_testnet() : chain::block::genesis_mainnet(); + block::genesis_testnet() : block::genesis_mainnet(); - const auto result = data_base::initialize(directory, genesis); + auto index_height = metadata_.configured.database.index_start_height; + const auto result = data_base(directory, index_height).create(genesis); LOG_INFO(LOG_SERVER) << BS_INITCHAIN_COMPLETE; return result;