aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core_tests')
-rw-r--r--tests/core_tests/bulletproofs.h2
-rw-r--r--tests/core_tests/chaingen.h23
-rw-r--r--tests/core_tests/multisig.h2
-rw-r--r--tests/core_tests/rct.h2
-rw-r--r--tests/core_tests/wallet_tools.cpp2
5 files changed, 23 insertions, 8 deletions
diff --git a/tests/core_tests/bulletproofs.h b/tests/core_tests/bulletproofs.h
index efc751df7..f9768a316 100644
--- a/tests/core_tests/bulletproofs.h
+++ b/tests/core_tests/bulletproofs.h
@@ -97,7 +97,7 @@ template<>
struct get_test_options<gen_bp_tx_validation_base> {
const std::pair<uint8_t, uint64_t> hard_forks[4] = {std::make_pair(1, 0), std::make_pair(2, 1), std::make_pair(10, 73), std::make_pair(0, 0)};
const cryptonote::test_options test_options = {
- hard_forks
+ hard_forks, 0
};
};
diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h
index f2bcb7787..797d1207b 100644
--- a/tests/core_tests/chaingen.h
+++ b/tests/core_tests/chaingen.h
@@ -643,7 +643,15 @@ public:
log_event("cryptonote::block");
cryptonote::block_verification_context bvc = AUTO_VAL_INIT(bvc);
- m_c.handle_incoming_block(t_serializable_object_to_blob(b), &b, bvc);
+ cryptonote::blobdata bd = t_serializable_object_to_blob(b);
+ std::vector<cryptonote::block> pblocks;
+ if (m_c.prepare_handle_incoming_blocks(std::vector<cryptonote::block_complete_entry>(1, {bd, {}}), pblocks))
+ {
+ m_c.handle_incoming_block(bd, &b, bvc);
+ m_c.cleanup_handle_incoming_blocks();
+ }
+ else
+ bvc.m_verifivation_failed = true;
bool r = check_block_verification_context(bvc, m_ev_index, b, m_validator);
CHECK_AND_NO_ASSERT_MES(r, false, "block verification context check failed");
return r;
@@ -666,7 +674,14 @@ public:
log_event("serialized_block");
cryptonote::block_verification_context bvc = AUTO_VAL_INIT(bvc);
- m_c.handle_incoming_block(sr_block.data, NULL, bvc);
+ std::vector<cryptonote::block> pblocks;
+ if (m_c.prepare_handle_incoming_blocks(std::vector<cryptonote::block_complete_entry>(1, {sr_block.data, {}}), pblocks))
+ {
+ m_c.handle_incoming_block(sr_block.data, NULL, bvc);
+ m_c.cleanup_handle_incoming_blocks();
+ }
+ else
+ bvc.m_verifivation_failed = true;
cryptonote::block blk;
std::stringstream ss;
@@ -748,7 +763,7 @@ template<typename t_test_class>
struct get_test_options {
const std::pair<uint8_t, uint64_t> hard_forks[2];
const cryptonote::test_options test_options = {
- hard_forks
+ hard_forks, 0
};
get_test_options():hard_forks{std::make_pair((uint8_t)1, (uint64_t)0), std::make_pair((uint8_t)0, (uint64_t)0)}{}
};
@@ -776,7 +791,7 @@ inline bool do_replay_events_get_core(std::vector<test_event_entry>& events, cry
// Hardforks can be specified in events.
v_hardforks_t hardforks;
- cryptonote::test_options test_options_tmp{};
+ cryptonote::test_options test_options_tmp{nullptr, 0};
const cryptonote::test_options * test_options_ = &gto.test_options;
if (extract_hard_forks(events, hardforks)){
hardforks.push_back(std::make_pair((uint8_t)0, (uint64_t)0)); // terminator
diff --git a/tests/core_tests/multisig.h b/tests/core_tests/multisig.h
index 1e8226d26..10fe6ffe8 100644
--- a/tests/core_tests/multisig.h
+++ b/tests/core_tests/multisig.h
@@ -84,7 +84,7 @@ template<>
struct get_test_options<gen_multisig_tx_validation_base> {
const std::pair<uint8_t, uint64_t> hard_forks[3] = {std::make_pair(1, 0), std::make_pair(4, 1), std::make_pair(0, 0)};
const cryptonote::test_options test_options = {
- hard_forks
+ hard_forks, 0
};
};
diff --git a/tests/core_tests/rct.h b/tests/core_tests/rct.h
index 72460d98e..00a2bd88c 100644
--- a/tests/core_tests/rct.h
+++ b/tests/core_tests/rct.h
@@ -83,7 +83,7 @@ template<>
struct get_test_options<gen_rct_tx_validation_base> {
const std::pair<uint8_t, uint64_t> hard_forks[4] = {std::make_pair(1, 0), std::make_pair(2, 1), std::make_pair(4, 65), std::make_pair(0, 0)};
const cryptonote::test_options test_options = {
- hard_forks
+ hard_forks, 0
};
};
diff --git a/tests/core_tests/wallet_tools.cpp b/tests/core_tests/wallet_tools.cpp
index 616774d18..d9cee34c1 100644
--- a/tests/core_tests/wallet_tools.cpp
+++ b/tests/core_tests/wallet_tools.cpp
@@ -135,7 +135,7 @@ bool wallet_tools::fill_tx_sources(tools::wallet2 * wallet, std::vector<cryptono
}
}
- MINFO("Selected " << i << " from tx: " << dump_keys(td.m_txid.data)
+ MDEBUG("Selected " << i << " from tx: " << dump_keys(td.m_txid.data)
<< " ki: " << dump_keys(td.m_key_image.data)
<< " amnt: " << td.amount()
<< " rct: " << td.is_rct()