diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-12-22 10:10:36 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-12-22 10:10:54 +0200 |
commit | aa7d6c5412da29ec39bb4c9aaba7e45633d27547 (patch) | |
tree | 3c85a553792605403878aa5e06067c641318a125 /src/wallet/wallet2.h | |
parent | Merge pull request #546 (diff) | |
parent | Allow the wallet to access hard fork information (diff) | |
download | monero-aa7d6c5412da29ec39bb4c9aaba7e45633d27547.tar.xz |
Merge pull request #547
8ea7af1 Allow the wallet to access hard fork information (moneromooo-monero)
760331b epee: make log macros behave like statements (moneromooo-monero)
3f2970f Add missing semicolons after log statements (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r-- | src/wallet/wallet2.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index ecf4ef3dc..74840c5ec 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -372,6 +372,7 @@ namespace tools crypto::hash get_payment_id(const pending_tx &ptx) const; void check_acc_out(const cryptonote::account_keys &acc, const cryptonote::tx_out &o, const crypto::public_key &tx_pub_key, size_t i, uint64_t &money_transfered, bool &error) const; void parse_block_round(const cryptonote::blobdata &blob, cryptonote::block &bl, crypto::hash &bl_id, bool &error) const; + bool use_fork_rules(uint8_t version); cryptonote::account_base m_account; std::string m_daemon_address; @@ -552,7 +553,8 @@ namespace tools // randomly select inputs for transaction // throw if requested send amount is greater than amount available to send std::list<transfer_container::iterator> selected_transfers; - uint64_t found_money = select_transfers(needed_money, 0 == fake_outputs_count, dust_policy.dust_threshold, selected_transfers); + const bool add_dust = (0 == fake_outputs_count) && !use_fork_rules(2); // first fork has version 2 + uint64_t found_money = select_transfers(needed_money, add_dust, dust_policy.dust_threshold, selected_transfers); THROW_WALLET_EXCEPTION_IF(found_money < needed_money, error::not_enough_money, found_money, needed_money - fee, fee); typedef COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::out_entry out_entry; |