diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-10-06 22:50:40 +0400 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-10-06 22:50:41 +0400 |
| commit | c58ec8cdc181988f5be7c4606294f0888d4e830c (patch) | |
| tree | 72d39384912450ed66511a7a6620c93ad9f3927c /src/wallet/wallet2.cpp | |
| parent | 3bcce5be8687fc99d5faa5c71e7a07afb7cdb39d (diff) | |
| parent | 986d03d4b252e00f7b8234df7b3c39eb960f0a41 (diff) | |
| download | monzero-core-c58ec8cdc181988f5be7c4606294f0888d4e830c.tar.gz monzero-core-c58ec8cdc181988f5be7c4606294f0888d4e830c.tar.xz monzero-core-c58ec8cdc181988f5be7c4606294f0888d4e830c.zip | |
Merge pull request #2468
986d03d4 simplewallet: allow to set threshold before warning about tx backlog (selsta)
Diffstat (limited to 'src/wallet/wallet2.cpp')
| -rw-r--r-- | src/wallet/wallet2.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 08e1d2a09..7121fc14f 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1939,6 +1939,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()); @@ -2014,6 +2017,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 { @@ -2086,6 +2090,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"); |
