aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/tx_validation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core_tests/tx_validation.cpp')
-rw-r--r--tests/core_tests/tx_validation.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/core_tests/tx_validation.cpp b/tests/core_tests/tx_validation.cpp
index f72c906e5..cf018c8e2 100644
--- a/tests/core_tests/tx_validation.cpp
+++ b/tests/core_tests/tx_validation.cpp
@@ -39,7 +39,7 @@ namespace
{
struct tx_builder
{
- void step1_init(size_t version = CURRENT_TRANSACTION_VERSION, uint64_t unlock_time = 0)
+ void step1_init(size_t version = 1, uint64_t unlock_time = 0)
{
m_tx.vin.clear();
m_tx.vout.clear();
@@ -108,9 +108,13 @@ namespace
BOOST_FOREACH(const tx_source_entry& src_entr, sources)
{
std::vector<const crypto::public_key*> keys_ptrs;
+ std::vector<crypto::public_key> keys(src_entr.outputs.size());
+ size_t j = 0;
BOOST_FOREACH(const tx_source_entry::output_entry& o, src_entr.outputs)
{
- keys_ptrs.push_back(&o.second);
+ keys[j] = rct::rct2pk(o.second.dest);
+ keys_ptrs.push_back(&keys[j]);
+ ++j;
}
m_tx.signatures.push_back(std::vector<crypto::signature>());
@@ -136,7 +140,7 @@ namespace
fill_tx_sources_and_destinations(events, blk_head, from, to, amount, TESTS_DEFAULT_FEE, 0, sources, destinations);
tx_builder builder;
- builder.step1_init(CURRENT_TRANSACTION_VERSION, unlock_time);
+ builder.step1_init(1, unlock_time);
builder.step2_fill_inputs(from.get_keys(), sources);
builder.step3_fill_outputs(destinations);
builder.step4_calc_hash();
@@ -177,7 +181,7 @@ bool gen_tx_big_version::generate(std::vector<test_event_entry>& events) const
fill_tx_sources_and_destinations(events, blk_0, miner_account, miner_account, MK_COINS(1), TESTS_DEFAULT_FEE, 0, sources, destinations);
tx_builder builder;
- builder.step1_init(CURRENT_TRANSACTION_VERSION + 1, 0);
+ builder.step1_init(1 + 1, 0);
builder.step2_fill_inputs(miner_account.get_keys(), sources);
builder.step3_fill_outputs(destinations);
builder.step4_calc_hash();