aboutsummaryrefslogtreecommitdiff
path: root/tests/core_proxy/core_proxy.cpp
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2021-01-01 22:33:27 -0800
committerAlexander Blair <snipa@jagtech.io>2021-01-01 22:33:27 -0800
commit3bf0721ae603f3efd8aeaa8e44b41b6c47bd4b83 (patch)
tree1513edd3ee6ed333a9312e5f2705c14a16a74b73 /tests/core_proxy/core_proxy.cpp
parent175aa2497a44ca9e47e0d99d8f9b3ce1d3f81648 (diff)
parent0aa541b3617563d41644e7d0beeb8e4e8325fd6d (diff)
downloadmonzero-core-3bf0721ae603f3efd8aeaa8e44b41b6c47bd4b83.tar.gz
monzero-core-3bf0721ae603f3efd8aeaa8e44b41b6c47bd4b83.tar.xz
monzero-core-3bf0721ae603f3efd8aeaa8e44b41b6c47bd4b83.zip
Merge pull request #7246
0aa541b36 protocol: more sanity checks in new chain block hashes (moneromooo-monero)
Diffstat (limited to 'tests/core_proxy/core_proxy.cpp')
-rw-r--r--tests/core_proxy/core_proxy.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/core_proxy/core_proxy.cpp b/tests/core_proxy/core_proxy.cpp
index 8095f03e3..09be8758b 100644
--- a/tests/core_proxy/core_proxy.cpp
+++ b/tests/core_proxy/core_proxy.cpp
@@ -245,12 +245,17 @@ bool tests::proxy_core::init(const boost::program_options::variables_map& /*vm*/
return true;
}
-bool tests::proxy_core::have_block(const crypto::hash& id) {
+bool tests::proxy_core::have_block_unlocked(const crypto::hash& id, int *where) {
if (m_hash2blkidx.end() == m_hash2blkidx.find(id))
return false;
+ if (where) *where = HAVE_BLOCK_MAIN_CHAIN;
return true;
}
+bool tests::proxy_core::have_block(const crypto::hash& id, int *where) {
+ return have_block_unlocked(id, where);
+}
+
void tests::proxy_core::build_short_history(std::list<crypto::hash> &m_history, const crypto::hash &m_start) {
m_history.push_front(get_block_hash(m_genesis));
/*std::unordered_map<crypto::hash, tests::block_index>::const_iterator cit = m_hash2blkidx.find(m_lastblk);