aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-01-27 18:08:56 -0800
committerRiccardo Spagni <ric@spagni.net>2018-01-27 18:08:56 -0800
commit29fafa4ca7c18e796bbd561b53d45db99d30ed45 (patch)
tree39880d433f73a72b3250274abee0baf8ffe20159 /src/wallet/api
parentMerge pull request #3116 (diff)
parentwallet: automatically use low priority if safe (no backlog & recent blocks no... (diff)
downloadmonero-29fafa4ca7c18e796bbd561b53d45db99d30ed45.tar.xz
Merge pull request #3123
30c44bce wallet: automatically use low priority if safe (no backlog & recent blocks not full) (stoffu) c903df5e simplewallet: bug fix for backlog estimate (stoffu) 2f5a9b6b wallet2: split estimate_backlog to allow for raw fee levels (moneromooo-monero)
Diffstat (limited to 'src/wallet/api')
-rw-r--r--src/wallet/api/wallet.cpp6
-rw-r--r--src/wallet/api/wallet2_api.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index fcf5c8844..82948081e 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -1074,6 +1074,8 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const
if (fake_outs_count == 0)
fake_outs_count = DEFAULT_MIXIN;
+ uint32_t adjusted_priority = m_wallet->adjust_priority(static_cast<uint32_t>(priority));
+
PendingTransactionImpl * transaction = new PendingTransactionImpl(*this);
do {
@@ -1133,7 +1135,7 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const
de.is_subaddress = info.is_subaddress;
dsts.push_back(de);
transaction->m_pending_tx = m_wallet->create_transactions_2(dsts, fake_outs_count, 0 /* unlock_time */,
- static_cast<uint32_t>(priority),
+ adjusted_priority,
extra, subaddr_account, subaddr_indices, m_trustedDaemon);
} else {
// for the GUI, sweep_all (i.e. amount set as "(all)") will always sweep all the funds in all the addresses
@@ -1143,7 +1145,7 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const
subaddr_indices.insert(index);
}
transaction->m_pending_tx = m_wallet->create_transactions_all(0, info.address, info.is_subaddress, fake_outs_count, 0 /* unlock_time */,
- static_cast<uint32_t>(priority),
+ adjusted_priority,
extra, subaddr_account, subaddr_indices, m_trustedDaemon);
}
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
index 672b48775..a22788399 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -70,6 +70,7 @@ struct PendingTransaction
};
enum Priority {
+ Priority_Default = 0,
Priority_Low = 1,
Priority_Medium = 2,
Priority_High = 3,