aboutsummaryrefslogtreecommitdiff
path: root/tests/functional_tests/transactions_flow_test.cpp
diff options
context:
space:
mode:
authorZachary Michaels <mikezackles@gmail.com>2014-09-04 22:14:36 -0400
committerRiccardo Spagni <ric@spagni.net>2014-09-15 15:53:10 +0200
commitfb4146fa343399229c754331ecc78fe0c759ec7c (patch)
tree18dbbb427c846d83590bcf4f959d759dd81b7e5e /tests/functional_tests/transactions_flow_test.cpp
parentAdd testnet constants (diff)
downloadmonero-fb4146fa343399229c754331ecc78fe0c759ec7c.tar.xz
Reorganize testnet constants
Diffstat (limited to '')
-rw-r--r--tests/functional_tests/transactions_flow_test.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/functional_tests/transactions_flow_test.cpp b/tests/functional_tests/transactions_flow_test.cpp
index 68c9f7ac7..2187ff250 100644
--- a/tests/functional_tests/transactions_flow_test.cpp
+++ b/tests/functional_tests/transactions_flow_test.cpp
@@ -37,6 +37,12 @@ using namespace epee;
#include "wallet/wallet2.h"
using namespace cryptonote;
+namespace
+{
+ uint64_t const TEST_FEE = 5000000000; // 5 * 10^9
+ uint64_t const TEST_DUST_THRESHOLD = 5000000000; // 5 * 10^9
+}
+
std::string generate_random_wallet_name()
{
std::stringstream ss;
@@ -79,7 +85,7 @@ bool do_send_money(tools::wallet2& w1, tools::wallet2& w2, size_t mix_in_factor,
try
{
tools::wallet2::pending_tx ptx;
- w1.transfer(dsts, mix_in_factor, 0, DEFAULT_FEE, std::vector<uint8_t>(), tools::detail::null_split_strategy, tools::tx_dust_policy(DEFAULT_FEE), tx, ptx);
+ w1.transfer(dsts, mix_in_factor, 0, TEST_FEE, std::vector<uint8_t>(), tools::detail::null_split_strategy, tools::tx_dust_policy(TEST_DUST_THRESHOLD), tx, ptx);
w1.commit_tx(ptx);
return true;
}
@@ -185,7 +191,7 @@ bool transactions_flow_test(std::string& working_folder,
BOOST_FOREACH(tools::wallet2::transfer_details& td, incoming_transfers)
{
cryptonote::transaction tx_s;
- bool r = do_send_money(w1, w1, 0, td.m_tx.vout[td.m_internal_output_index].amount - DEFAULT_FEE, tx_s, 50);
+ bool r = do_send_money(w1, w1, 0, td.m_tx.vout[td.m_internal_output_index].amount - TEST_FEE, tx_s, 50);
CHECK_AND_ASSERT_MES(r, false, "Failed to send starter tx " << get_transaction_hash(tx_s));
LOG_PRINT_GREEN("Starter transaction sent " << get_transaction_hash(tx_s), LOG_LEVEL_0);
if(++count >= FIRST_N_TRANSFERS)
@@ -213,7 +219,7 @@ bool transactions_flow_test(std::string& working_folder,
for(i = 0; i != transactions_count; i++)
{
uint64_t amount_to_tx = (amount_to_transfer - transfered_money) > transfer_size ? transfer_size: (amount_to_transfer - transfered_money);
- while(w1.unlocked_balance() < amount_to_tx + DEFAULT_FEE)
+ while(w1.unlocked_balance() < amount_to_tx + TEST_FEE)
{
misc_utils::sleep_no_w(1000);
LOG_PRINT_L0("not enough money, waiting for cashback or mining");