aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/chaingen.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-17 08:28:16 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-17 08:28:16 +0200
commit7973fb6a69ffa7c4f9d1671250d4a09ebf2965bb (patch)
tree55e58066e40306b5e0fa3f0178945fa9955a75e2 /tests/core_tests/chaingen.cpp
parentMerge pull request #5413 (diff)
parentRemove unneeded SFINAE on check_tx/block verification in core_tests (diff)
downloadmonero-7973fb6a69ffa7c4f9d1671250d4a09ebf2965bb.tar.xz
Merge pull request #5415
299052bc Remove unneeded SFINAE on check_tx/block verification in core_tests (Doyle)
Diffstat (limited to 'tests/core_tests/chaingen.cpp')
-rw-r--r--tests/core_tests/chaingen.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp
index 09bc10ea8..614585349 100644
--- a/tests/core_tests/chaingen.cpp
+++ b/tests/core_tests/chaingen.cpp
@@ -1146,3 +1146,21 @@ bool test_chain_unit_base::verify(const std::string& cb_name, cryptonote::core&
}
return cb_it->second(c, ev_index, events);
}
+
+bool test_chain_unit_base::check_block_verification_context(const cryptonote::block_verification_context& bvc, size_t event_idx, const cryptonote::block& /*blk*/)
+{
+ return !bvc.m_verifivation_failed;
+}
+
+bool test_chain_unit_base::check_tx_verification_context(const cryptonote::tx_verification_context& tvc, bool /*tx_added*/, size_t /*event_index*/, const cryptonote::transaction& /*tx*/)
+{
+ return !tvc.m_verifivation_failed;
+}
+
+bool test_chain_unit_base::check_tx_verification_context_array(const std::vector<cryptonote::tx_verification_context>& tvcs, size_t /*tx_added*/, size_t /*event_index*/, const std::vector<cryptonote::transaction>& /*txs*/)
+{
+ for (const cryptonote::tx_verification_context &tvc: tvcs)
+ if (tvc.m_verifivation_failed)
+ return false;
+ return true;
+}