diff --git a/include/IWalletLegacy.h b/include/IWalletLegacy.h index 4757231..bb4bab8 100644 --- a/include/IWalletLegacy.h +++ b/include/IWalletLegacy.h @@ -113,8 +113,8 @@ class IWalletLegacy { virtual TransactionId sendTransaction(const WalletLegacyTransfer& transfer, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0) = 0; virtual TransactionId sendTransaction(const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0) = 0; - virtual TransactionId sendDustTransaction(const WalletLegacyTransfer& transfer, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0) = 0; - virtual TransactionId sendDustTransaction(const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0) = 0; + virtual TransactionId sendDustTransaction(const WalletLegacyTransfer& transfer, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 1, uint64_t unlockTimestamp = 0) = 0; + virtual TransactionId sendDustTransaction(const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 1, uint64_t unlockTimestamp = 0) = 0; virtual std::error_code cancelTransaction(size_t transferId) = 0; virtual void getAccountKeys(AccountKeys& keys) = 0; diff --git a/src/WalletLegacy/WalletLegacy.h b/src/WalletLegacy/WalletLegacy.h index bbdf5bb..3d3699b 100644 --- a/src/WalletLegacy/WalletLegacy.h +++ b/src/WalletLegacy/WalletLegacy.h @@ -98,8 +98,8 @@ class WalletLegacy : virtual TransactionId sendTransaction(const WalletLegacyTransfer& transfer, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0) override; virtual TransactionId sendTransaction(const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0) override; - virtual TransactionId sendDustTransaction(const WalletLegacyTransfer& transfer, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0) override; - virtual TransactionId sendDustTransaction(const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0) override; + virtual TransactionId sendDustTransaction(const WalletLegacyTransfer& transfer, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 1, uint64_t unlockTimestamp = 0) override; + virtual TransactionId sendDustTransaction(const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 1, uint64_t unlockTimestamp = 0) override; virtual std::error_code cancelTransaction(size_t transactionId) override; virtual void getAccountKeys(AccountKeys& keys) override; diff --git a/src/WalletLegacy/WalletTransactionSender.cpp b/src/WalletLegacy/WalletTransactionSender.cpp index 7755f9b..fdb13a2 100644 --- a/src/WalletLegacy/WalletTransactionSender.cpp +++ b/src/WalletLegacy/WalletTransactionSender.cpp @@ -114,7 +114,7 @@ std::shared_ptr WalletTransactionSender::makeSendRequest(Transact std::shared_ptr context = std::make_shared(); - context->foundMoney = selectTransfersToSend(neededMoney, 0 == mixIn, m_currency.defaultDustThreshold(), context->selectedTransfers); + context->foundMoney = selectTransfersToSend(neededMoney, 1 == mixIn, m_currency.defaultDustThreshold(), context->selectedTransfers); throwIf(context->foundMoney < neededMoney, error::WRONG_AMOUNT); transactionId = m_transactionsCache.addNewTransaction(neededMoney, fee, extra, transfers, unlockTimestamp); diff --git a/src/WalletLegacy/WalletTransactionSender.h b/src/WalletLegacy/WalletTransactionSender.h index 690e3ce..c8f5ebd 100644 --- a/src/WalletLegacy/WalletTransactionSender.h +++ b/src/WalletLegacy/WalletTransactionSender.h @@ -41,7 +41,7 @@ class WalletTransactionSender const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0); std::shared_ptr makeSendDustRequest(TransactionId& transactionId, std::deque>& events, - const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0); + const std::vector& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 1, uint64_t unlockTimestamp = 0); private: std::shared_ptr makeGetRandomOutsRequest(std::shared_ptr context);