Skip to content

Commit

Permalink
change unmixable dust mixin to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
parsicoin committed Aug 22, 2018
1 parent 98e1f88 commit 4c00310
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/IWalletLegacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<WalletLegacyTransfer>& 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<WalletLegacyTransfer>& 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<WalletLegacyTransfer>& 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;
Expand Down
4 changes: 2 additions & 2 deletions src/WalletLegacy/WalletLegacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<WalletLegacyTransfer>& 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<WalletLegacyTransfer>& 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<WalletLegacyTransfer>& 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;
Expand Down
2 changes: 1 addition & 1 deletion src/WalletLegacy/WalletTransactionSender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ std::shared_ptr<WalletRequest> WalletTransactionSender::makeSendRequest(Transact

std::shared_ptr<SendTransactionContext> context = std::make_shared<SendTransactionContext>();

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);
Expand Down
2 changes: 1 addition & 1 deletion src/WalletLegacy/WalletTransactionSender.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class WalletTransactionSender
const std::vector<WalletLegacyTransfer>& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0);

std::shared_ptr<WalletRequest> makeSendDustRequest(TransactionId& transactionId, std::deque<std::shared_ptr<WalletLegacyEvent>>& events,
const std::vector<WalletLegacyTransfer>& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0);
const std::vector<WalletLegacyTransfer>& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 1, uint64_t unlockTimestamp = 0);

private:
std::shared_ptr<WalletRequest> makeGetRandomOutsRequest(std::shared_ptr<SendTransactionContext> context);
Expand Down

0 comments on commit 4c00310

Please sign in to comment.