aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-10 10:10:04 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-10 11:12:56 +0100
commita1891ebea961889c2e1d1a918d84495b31ec121f (patch)
tree861119558caa3a4598e2f55850facbea75ab8625 /tests
parentMerge pull request #2271 (diff)
downloadmonero-a1891ebea961889c2e1d1a918d84495b31ec121f.tar.xz
tests: fix tests build
Add get_fork_version and add_ideal_fork_version to core so cryptonote_protocol does not have to need the Blockchain class directly, as it's not in its dependencies, and add those to the fake core classes in tests too.
Diffstat (limited to 'tests')
-rw-r--r--tests/core_proxy/core_proxy.h2
-rw-r--r--tests/unit_tests/ban.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h
index 35e88081b..b7d5725f0 100644
--- a/tests/core_proxy/core_proxy.h
+++ b/tests/core_proxy/core_proxy.h
@@ -96,5 +96,7 @@ namespace tests
bool get_blocks(uint64_t start_offset, size_t count, std::list<std::pair<cryptonote::blobdata, cryptonote::block>>& blocks, std::list<cryptonote::blobdata>& txs) const { return false; }
bool get_transactions(const std::vector<crypto::hash>& txs_ids, std::list<cryptonote::transaction>& txs, std::list<crypto::hash>& missed_txs) const { return false; }
bool get_block_by_hash(const crypto::hash &h, cryptonote::block &blk, bool *orphan = NULL) const { return false; }
+ uint8_t get_ideal_hard_fork_version(uint64_t height) const { return 0; }
+ uint8_t get_hard_fork_version(uint64_t height) const { return 0; }
};
}
diff --git a/tests/unit_tests/ban.cpp b/tests/unit_tests/ban.cpp
index 694d733ec..6fc8b83dd 100644
--- a/tests/unit_tests/ban.cpp
+++ b/tests/unit_tests/ban.cpp
@@ -73,6 +73,8 @@ public:
bool get_blocks(uint64_t start_offset, size_t count, std::list<std::pair<cryptonote::blobdata, cryptonote::block>>& blocks, std::list<cryptonote::blobdata>& txs) const { return false; }
bool get_transactions(const std::vector<crypto::hash>& txs_ids, std::list<cryptonote::transaction>& txs, std::list<crypto::hash>& missed_txs) const { return false; }
bool get_block_by_hash(const crypto::hash &h, cryptonote::block &blk, bool *orphan = NULL) const { return false; }
+ uint8_t get_ideal_hard_fork_version(uint64_t height) const { return 0; }
+ uint8_t get_hard_fork_version(uint64_t height) const { return 0; }
};
typedef nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<test_core>> Server;