send step2 clarified arg sending_amount as final_total_wo_fee

pull/29/head
Paul Shapiro 6 years ago
parent 9ed97d0902
commit ee3eede5d2

@ -377,7 +377,7 @@ void monero_transfer_utils::send_step2__try_create_transaction(
string sec_spendKey_string,
string to_address_string,
optional<string> payment_id_string,
uint64_t sending_amount,
uint64_t final_total_wo_fee,
uint64_t change_amount,
uint64_t fee_amount,
uint32_t simple_priority,
@ -396,7 +396,7 @@ void monero_transfer_utils::send_step2__try_create_transaction(
from_address_string,
sec_viewKey_string, sec_spendKey_string,
to_address_string, payment_id_string,
sending_amount, change_amount, fee_amount,
final_total_wo_fee, change_amount, fee_amount,
using_outs, mix_outs,
use_fork_rules_fn,
unlock_time,

@ -216,7 +216,7 @@ namespace monero_transfer_utils
string sec_spendKey_string,
string to_address_string,
optional<string> payment_id_string,
uint64_t sending_amount,
uint64_t final_total_wo_fee, // this gets passed to create_transaction's 'sending_amount'
uint64_t change_amount,
uint64_t fee_amount,
uint32_t simple_priority,

@ -587,7 +587,7 @@ string serial_bridge::send_step2__try_create_transaction(const string &args_stri
json_root.get<string>("sec_spendKey_string"),
json_root.get<string>("to_address_string"),
json_root.get_optional<string>("payment_id_string"),
stoull(json_root.get<string>("sending_amount")),
stoull(json_root.get<string>("final_total_wo_fee")),
stoull(json_root.get<string>("change_amount")),
stoull(json_root.get<string>("fee_amount")),
stoul(json_root.get<string>("priority")),

@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(bridge__transfers__send__sweepDust)
}
{
boost::property_tree::ptree root;
root.put("sending_amount", *final_total_wo_fee_string); // NOTE: one must use this as the final total - for ex during a sweep we dont know sending_amount until reading this value
root.put("final_total_wo_fee", *final_total_wo_fee_string);
root.put("change_amount", *change_amount_string); // from step1
root.put("fee_amount", *using_fee_string); // from step1
root.add_child("using_outs", using_outs); // from step1
@ -279,7 +279,7 @@ BOOST_AUTO_TEST_CASE(bridge__transfers__send__sweepDust)
BOOST_REQUIRE((*fee_actually_needed_string).size() > 0);
//
// This means we must go back through step1 to re-pick using_outs
BOOST_REQUIRE(construction_attempt_n < 2); // not generally expecting to have to do this more than once
BOOST_REQUIRE(construction_attempt_n < 3); // not generally expecting to have to do this more than once or twice
continue; // proceed to next iteration (re-enter tx construction at step1(II) with fee_actually_needed_string from step2(I))
}
optional<string> tx_hash = ret_tree.get_optional<string>(ret_json_key__send__tx_hash());
@ -447,7 +447,7 @@ BOOST_AUTO_TEST_CASE(bridge__transfers__send__amount)
}
{
boost::property_tree::ptree root;
root.put("sending_amount", *final_total_wo_fee_string); // NOTE: one must use this as the final total - for ex during a sweep we dont know sending_amount until reading this value
root.put("final_total_wo_fee", *final_total_wo_fee_string);
root.put("change_amount", *change_amount_string); // from step1
root.put("fee_amount", *using_fee_string); // from step1
root.add_child("using_outs", using_outs); // from step1
@ -483,7 +483,7 @@ BOOST_AUTO_TEST_CASE(bridge__transfers__send__amount)
BOOST_REQUIRE((*fee_actually_needed_string).size() > 0);
//
// This means we must go back through step1 to re-pick using_outs
BOOST_REQUIRE(construction_attempt_n < 2); // not generally expecting to have to do this more than once
BOOST_REQUIRE(construction_attempt_n < 3); // not generally expecting to have to do this more than once or twice
continue; // proceed to next iteration (re-enter tx construction at step1(II) with fee_actually_needed_string from step2(I))
}
optional<string> tx_hash = ret_tree.get_optional<string>(ret_json_key__send__tx_hash());

Loading…
Cancel
Save