diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-08-04 12:38:55 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-08-22 09:57:42 +0000 |
commit | b219c24c3a2576161b7eb58120123b278c5b1be7 (patch) | |
tree | 980874379b76c9a6f76653f339945712cc5dea01 /src/wallet | |
parent | wallet2: fix checking the wrong vector when adding hashes (diff) | |
download | monero-b219c24c3a2576161b7eb58120123b278c5b1be7.tar.xz |
wallet2: trim hash chain after fast refresh of hashes
This ensures it can't end up filled with the actual placeholders
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 7ef49c27d..8da62c76d 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2292,6 +2292,7 @@ void wallet2::fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height, while (missing_blocks-- > 0) m_blockchain.push_back(crypto::null_hash); // maybe a bit suboptimal, but deque won't do huge reallocs like vector m_blockchain.push_back(m_checkpoints.get_points().at(checkpoint_height)); + m_blockchain.trim(checkpoint_height); short_chain_history.clear(); get_short_chain_history(short_chain_history); } |