diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-10-15 18:27:08 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-10-15 18:27:08 +0200 |
commit | 1c546e0d813a201a536c13bdd015afb68377a264 (patch) | |
tree | 2b3527d422bc3517a811bb46ac4b688a27ea8947 /src/wallet/wallet2.h | |
parent | Merge pull request #2556 (diff) | |
parent | tests: fix hashchain unit tests (diff) | |
download | monero-1c546e0d813a201a536c13bdd015afb68377a264.tar.xz |
Merge pull request #2565
452d4fae tests: fix hashchain unit tests (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r-- | src/wallet/wallet2.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 31afd0b9e..26680c3da 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -116,7 +116,7 @@ namespace tools void crop(size_t height) { m_blockchain.resize(height - m_offset); } void clear() { m_offset = 0; m_blockchain.clear(); } bool empty() const { return m_blockchain.empty() && m_offset == 0; } - void trim(size_t height) { while (height > m_offset+1 && m_blockchain.size() > 1) { m_blockchain.pop_front(); ++m_offset; } m_blockchain.shrink_to_fit(); } + void trim(size_t height) { while (height > m_offset && m_blockchain.size() > 1) { m_blockchain.pop_front(); ++m_offset; } m_blockchain.shrink_to_fit(); } void refill(const crypto::hash &hash) { m_blockchain.push_back(hash); --m_offset; } template <class t_archive> |