diff options
author | awfulcrawler <awfulcrawler@fake-email.com> | 2016-04-18 14:57:47 +1200 |
---|---|---|
committer | awfulcrawler <awfulcrawler@fake-email.com> | 2016-04-18 14:57:47 +1200 |
commit | 4b325bdb6651430f7efcdd5e1f19ae4511e22b2a (patch) | |
tree | e083064ee8ac2fe8060a36c543a4872d9cc6e7fa /src/wallet/wallet2.h | |
parent | Merge pull request #1 from monero-project/master (diff) | |
download | monero-4b325bdb6651430f7efcdd5e1f19ae4511e22b2a.tar.xz |
modified: src/simplewallet/simplewallet.cpp
modified: src/wallet/wallet2.cpp
modified: src/wallet/wallet2.h
Update to fix unconfirmed balance and give a slightly more verbose and informative confirmation message for transfers
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r-- | src/wallet/wallet2.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 179d1553e..f505d7693 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -143,6 +143,7 @@ namespace tools { cryptonote::transaction tx; uint64_t dust, fee; + bool dust_added_to_fee; //AC cryptonote::tx_destination_entry change_dts; std::list<transfer_container::iterator> selected_transfers; std::string key_images; @@ -711,10 +712,16 @@ namespace tools return true; }); THROW_WALLET_EXCEPTION_IF(!all_are_txin_to_key, error::unexpected_txin_type, tx); + + 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; ptx.key_images = key_images; - ptx.fee = fee; - ptx.dust = dust; + 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.tx = tx; ptx.change_dts = change_dts; ptx.selected_transfers = selected_transfers; |