From 7d07c64fe59846b20b1e322881c1ead2fe78460d Mon Sep 17 00:00:00 2001 From: kenshi84 Date: Fri, 10 Mar 2017 10:20:38 +0900 Subject: [PATCH] fix dependency: put HardFork back to cryptonote_basic, made some BlockchainDB functions virtual again to avoid missing symbols error --- src/blockchain_db/blockchain_db.h | 10 +++++----- src/cryptonote_basic/CMakeLists.txt | 2 ++ src/{cryptonote_core => cryptonote_basic}/hardfork.cpp | 0 src/{cryptonote_core => cryptonote_basic}/hardfork.h | 0 src/cryptonote_core/CMakeLists.txt | 2 -- src/cryptonote_core/blockchain.h | 2 +- src/daemon/rpc_command_executor.cpp | 2 +- tests/unit_tests/hardfork.cpp | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) rename src/{cryptonote_core => cryptonote_basic}/hardfork.cpp (100%) rename src/{cryptonote_core => cryptonote_basic}/hardfork.h (100%) diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 674b844c..f5710550 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -37,7 +37,7 @@ #include "cryptonote_protocol/blobdatatype.h" #include "cryptonote_basic/cryptonote_basic.h" #include "cryptonote_basic/difficulty.h" -#include "cryptonote_core/hardfork.h" +#include "cryptonote_basic/hardfork.h" /** \file * Cryptonote Blockchain Database Interface @@ -768,7 +768,7 @@ public: * * @return the block requested */ - block get_block(const crypto::hash& h) const; + virtual block get_block(const crypto::hash& h) const; /** * @brief gets the height of the block with a given hash @@ -821,7 +821,7 @@ public: * * @return the block */ - block get_block_from_height(const uint64_t& height) const; + virtual block get_block_from_height(const uint64_t& height) const; /** * @brief fetch a block's timestamp @@ -1041,7 +1041,7 @@ public: * * @return the transaction with the given hash */ - transaction get_tx(const crypto::hash& h) const; + virtual transaction get_tx(const crypto::hash& h) const; /** * @brief fetches the transaction with the given hash @@ -1052,7 +1052,7 @@ public: * * @return true iff the transaction was found */ - bool get_tx(const crypto::hash& h, transaction &tx) const; + virtual bool get_tx(const crypto::hash& h, transaction &tx) const; /** * @brief fetches the transaction blob with the given hash diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt index db478c69..2b8ad365 100644 --- a/src/cryptonote_basic/CMakeLists.txt +++ b/src/cryptonote_basic/CMakeLists.txt @@ -32,6 +32,7 @@ set(cryptonote_basic_sources cryptonote_basic_impl.cpp cryptonote_format_utils.cpp difficulty.cpp + hardfork.cpp miner.cpp) set(cryptonote_basic_headers) @@ -47,6 +48,7 @@ set(cryptonote_basic_private_headers cryptonote_format_utils.h cryptonote_stat_info.h difficulty.h + hardfork.h miner.h tx_extra.h verification_context.h) diff --git a/src/cryptonote_core/hardfork.cpp b/src/cryptonote_basic/hardfork.cpp similarity index 100% rename from src/cryptonote_core/hardfork.cpp rename to src/cryptonote_basic/hardfork.cpp diff --git a/src/cryptonote_core/hardfork.h b/src/cryptonote_basic/hardfork.h similarity index 100% rename from src/cryptonote_core/hardfork.h rename to src/cryptonote_basic/hardfork.h diff --git a/src/cryptonote_core/CMakeLists.txt b/src/cryptonote_core/CMakeLists.txt index 8a72dd25..5944ddcd 100644 --- a/src/cryptonote_core/CMakeLists.txt +++ b/src/cryptonote_core/CMakeLists.txt @@ -30,7 +30,6 @@ set(cryptonote_core_sources blockchain.cpp cryptonote_core.cpp tx_pool.cpp - hardfork.cpp cryptonote_tx_utils.cpp) set(cryptonote_core_headers) @@ -38,7 +37,6 @@ set(cryptonote_core_headers) set(cryptonote_core_private_headers blockchain_storage_boost_serialization.h blockchain.h - hardfork.h cryptonote_core.h tx_pool.h cryptonote_tx_utils.h) diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 6e4ba5e2..2c7420e1 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -51,7 +51,7 @@ #include "cryptonote_basic/verification_context.h" #include "crypto/hash.h" #include "cryptonote_basic/checkpoints.h" -#include "cryptonote_core/hardfork.h" +#include "cryptonote_basic/hardfork.h" #include "blockchain_db/blockchain_db.h" namespace cryptonote diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 80109c79..e9f95ae6 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -34,7 +34,7 @@ #include "daemon/rpc_command_executor.h" #include "rpc/core_rpc_server_commands_defs.h" #include "cryptonote_core/cryptonote_core.h" -#include "cryptonote_core/hardfork.h" +#include "cryptonote_basic/hardfork.h" #include #include #include diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp index 512216de..08c4276c 100644 --- a/tests/unit_tests/hardfork.cpp +++ b/tests/unit_tests/hardfork.cpp @@ -33,7 +33,7 @@ #include "blockchain_db/lmdb/db_lmdb.h" #include "cryptonote_basic/cryptonote_format_utils.h" -#include "cryptonote_core/hardfork.h" +#include "cryptonote_basic/hardfork.h" using namespace cryptonote;