aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp6
-rw-r--r--src/wallet/wallet2.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 56dedbf7f..18e63f596 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1933,6 +1933,9 @@ bool wallet2::store_keys(const std::string& keys_file_name, const std::string& p
value2.SetInt(m_confirm_backlog ? 1 :0);
json.AddMember("confirm_backlog", value2, json.GetAllocator());
+ value2.SetUint(m_confirm_backlog_threshold);
+ json.AddMember("confirm_backlog_threshold", value2, json.GetAllocator());
+
value2.SetInt(m_testnet ? 1 :0);
json.AddMember("testnet", value2, json.GetAllocator());
@@ -2008,6 +2011,7 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
m_min_output_value = 0;
m_merge_destinations = false;
m_confirm_backlog = true;
+ m_confirm_backlog_threshold = 0;
}
else
{
@@ -2080,6 +2084,8 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
m_merge_destinations = field_merge_destinations;
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, confirm_backlog, int, Int, false, true);
m_confirm_backlog = field_confirm_backlog;
+ GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, confirm_backlog_threshold, uint32_t, Uint, false, 0);
+ m_confirm_backlog_threshold = field_confirm_backlog_threshold;
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, testnet, int, Int, false, m_testnet);
// Wallet is being opened with testnet flag, but is saved as a mainnet wallet
THROW_WALLET_EXCEPTION_IF(m_testnet && !field_testnet, error::wallet_internal_error, "Mainnet wallet can not be opened as testnet wallet");
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index 56ec552da..e31ad5dc8 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -600,6 +600,8 @@ namespace tools
bool merge_destinations() const { return m_merge_destinations; }
bool confirm_backlog() const { return m_confirm_backlog; }
void confirm_backlog(bool always) { m_confirm_backlog = always; }
+ void set_confirm_backlog_threshold(uint32_t threshold) { m_confirm_backlog_threshold = threshold; };
+ uint32_t get_confirm_backlog_threshold() const { return m_confirm_backlog_threshold; };
bool get_tx_key(const crypto::hash &txid, crypto::secret_key &tx_key) const;
@@ -772,6 +774,7 @@ namespace tools
uint64_t m_min_output_value;
bool m_merge_destinations;
bool m_confirm_backlog;
+ uint32_t m_confirm_backlog_threshold;
bool m_is_initialized;
NodeRPCProxy m_node_rpc_proxy;
std::unordered_set<crypto::hash> m_scanned_pool_txs[2];