aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/functional_tests/transactions_flow_test.cpp2
-rw-r--r--tests/unit_tests/output_selection.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/functional_tests/transactions_flow_test.cpp b/tests/functional_tests/transactions_flow_test.cpp
index 6bf910101..585328348 100644
--- a/tests/functional_tests/transactions_flow_test.cpp
+++ b/tests/functional_tests/transactions_flow_test.cpp
@@ -281,7 +281,7 @@ bool transactions_flow_test(std::string& working_folder,
w2.get_transfers(tc);
BOOST_FOREACH(tools::wallet2::transfer_details& td, tc)
{
- auto it = txs.find(get_transaction_hash(td.m_tx));
+ auto it = txs.find(td.m_txid);
CHECK_AND_ASSERT_MES(it != txs.end(), false, "transaction not found in local cache");
it->second.m_received_count += 1;
}
diff --git a/tests/unit_tests/output_selection.cpp b/tests/unit_tests/output_selection.cpp
index a3164fa4e..4344d1ffc 100644
--- a/tests/unit_tests/output_selection.cpp
+++ b/tests/unit_tests/output_selection.cpp
@@ -42,6 +42,11 @@ static tools::wallet2::transfer_container make_transfers_container(size_t N)
tools::wallet2::transfer_details &td = transfers.back();
td.m_block_height = 1000;
td.m_spent = false;
+ td.m_txid = cryptonote::null_hash;
+ td.m_txid.data[0] = n & 0xff;
+ td.m_txid.data[1] = (n >> 8) & 0xff;
+ td.m_txid.data[2] = (n >> 16) & 0xff;
+ td.m_txid.data[3] = (n >> 24) & 0xff;
}
return transfers;
}