aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorawfulcrawler <awfulcrawler@fake-email.com>2016-04-18 20:20:31 +1200
committerawfulcrawler <awfulcrawler@fake-email.com>2016-04-18 20:20:31 +1200
commit68cbe1579ee16b578d0dcc76cd1ff539616e3709 (patch)
tree2cad894c239a0894a5e5ccee227170b634eaa4cc /src/wallet
parent modified: src/simplewallet/simplewallet.cpp (diff)
downloadmonero-68cbe1579ee16b578d0dcc76cd1ff539616e3709.tar.xz
modified: src/wallet/wallet2.cpp
modified: src/wallet/wallet2.h Removed working comments
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp7
-rw-r--r--src/wallet/wallet2.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index dc7a093ad..6d8b1d802 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1966,8 +1966,9 @@ void wallet2::commit_tx(pending_tx& ptx)
BOOST_FOREACH(transfer_container::iterator it, ptx.selected_transfers)
it->m_spent = true;
+ //fee includes dust if dust policy specified it.
LOG_PRINT_L0("Transaction successfully sent. <" << txid << ">" << ENDL
- << "Commission: " << print_money(ptx.fee) << " (dust sent to dust addr: " << print_money((ptx.dust_added_to_fee ? 0 : ptx.dust)) << ")" << ENDL //AC: fee includes dust; dust lists dust sent elsewhere
+ << "Commission: " << print_money(ptx.fee) << " (dust sent to dust addr: " << print_money((ptx.dust_added_to_fee ? 0 : ptx.dust)) << ")" << ENDL
<< "Balance: " << print_money(balance()) << ENDL
<< "Unlocked: " << print_money(unlocked_balance()) << ENDL
<< "Please, wait for confirmation for your balance to be unlocked.");
@@ -2230,7 +2231,7 @@ void wallet2::transfer_selected(const std::vector<cryptonote::tx_destination_ent
bool dust_sent_elsewhere = (dust_policy.addr_for_dust.m_view_public_key != change_dts.addr.m_view_public_key
|| dust_policy.addr_for_dust.m_spend_public_key != change_dts.addr.m_spend_public_key);
- if (dust_policy.add_to_fee || dust_sent_elsewhere) change_dts.amount -= dust; //AC
+ if (dust_policy.add_to_fee || dust_sent_elsewhere) change_dts.amount -= dust;
ptx.key_images = key_images;
ptx.fee = (dust_policy.add_to_fee ? fee+dust : fee);
@@ -2400,7 +2401,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
detail::digit_split_strategy, tx_dust_policy(::config::DEFAULT_DUST_THRESHOLD), test_tx, test_ptx);
auto txBlob = t_serializable_object_to_blob(test_ptx.tx);
needed_fee = calculate_fee(txBlob);
- available_for_fee = test_ptx.fee + test_ptx.change_dts.amount + (!test_ptx.dust_added_to_fee ? test_ptx.dust : 0); //AC
+ available_for_fee = test_ptx.fee + test_ptx.change_dts.amount + (!test_ptx.dust_added_to_fee ? test_ptx.dust : 0);
LOG_PRINT_L2("Made a " << txBlob.size() << " kB tx, with " << print_money(available_for_fee) << " available for fee (" <<
print_money(needed_fee) << " needed)");
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index f505d7693..dc3b8482f 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -143,7 +143,7 @@ namespace tools
{
cryptonote::transaction tx;
uint64_t dust, fee;
- bool dust_added_to_fee; //AC
+ bool dust_added_to_fee;
cryptonote::tx_destination_entry change_dts;
std::list<transfer_container::iterator> selected_transfers;
std::string key_images;
@@ -721,7 +721,7 @@ namespace tools
ptx.key_images = key_images;
ptx.fee = (dust_policy.add_to_fee ? fee+dust : fee);
ptx.dust = ((dust_policy.add_to_fee || dust_sent_elsewhere) ? dust : 0);
- ptx.dust_added_to_fee = dust_policy.add_to_fee; //AC
+ ptx.dust_added_to_fee = dust_policy.add_to_fee;
ptx.tx = tx;
ptx.change_dts = change_dts;
ptx.selected_transfers = selected_transfers;