aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-06-10 13:52:10 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-06-23 16:01:41 +0300
commite7d8f2a085b05c2c1ec25f75ff7a892deedcf666 (patch)
tree041e5d9be5a7ad552fb432231c81ea20e3b3595f /src/wallet
parentWallet::filename, Wallet::keysFilename, tests for move wallet (diff)
downloadmonero-e7d8f2a085b05c2c1ec25f75ff7a892deedcf666.tar.xz
wallet::default_mixin exposed to public interface as
Wallet::setDefaultMixin, Wallet::defaultMixin; wallet::create_transaction_2 used in Wallet::createTransaction
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/api/wallet.cpp11
-rw-r--r--src/wallet/api/wallet.h2
-rw-r--r--src/wallet/wallet2_api.h10
3 files changed, 22 insertions, 1 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 5b68387ea..f6d7a561e 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -400,7 +400,7 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, uint64
try {
- transaction->m_pending_tx = m_wallet->create_transactions(dsts, fake_outs_count, 0 /* unlock_time */,
+ transaction->m_pending_tx = m_wallet->create_transactions_2(dsts, fake_outs_count, 0 /* unlock_time */,
0 /* unused fee arg*/, extra, m_trustedDaemon);
} catch (const tools::error::daemon_busy&) {
@@ -486,6 +486,15 @@ void WalletImpl::setListener(WalletListener *l)
m_wallet2Callback->setListener(l);
}
+uint32_t WalletImpl::defaultMixin() const
+{
+ return m_wallet->default_mixin();
+}
+
+void WalletImpl::setDefaultMixin(uint32_t arg)
+{
+ m_wallet->default_mixin(arg);
+}
bool WalletImpl::connectToDaemon()
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
index c402ef53c..6c8913c25 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -74,6 +74,8 @@ public:
virtual void disposeTransaction(PendingTransaction * t);
virtual TransactionHistory * history() const;
virtual void setListener(WalletListener * l);
+ virtual uint32_t defaultMixin() const;
+ virtual void setDefaultMixin(uint32_t arg);
private:
void clearStatus();
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h
index bf5ddc3c7..62231820b 100644
--- a/src/wallet/wallet2_api.h
+++ b/src/wallet/wallet2_api.h
@@ -167,6 +167,16 @@ struct Wallet
virtual void disposeTransaction(PendingTransaction * t) = 0;
virtual TransactionHistory * history() const = 0;
virtual void setListener(WalletListener *) = 0;
+ /*!
+ * \brief defaultMixin - returns number of mixins used in transactions
+ * \return
+ */
+ virtual uint32_t defaultMixin() const = 0;
+ /*!
+ * \brief setDefaultMixin - setum number of mixins to be used for new transactions
+ * \param arg
+ */
+ virtual void setDefaultMixin(uint32_t arg) = 0;
};
/**