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 | |
| parent | 51bfdfb67406f07c771f16ffed01af4d68758ef0 (diff) | |
| parent | 452d4fae396589850e4dcf66dbf1209ea96f0ef1 (diff) | |
| download | monzero-core-1c546e0d813a201a536c13bdd015afb68377a264.tar.gz monzero-core-1c546e0d813a201a536c13bdd015afb68377a264.tar.xz monzero-core-1c546e0d813a201a536c13bdd015afb68377a264.zip | |
Merge pull request #2565
452d4fae tests: fix hashchain unit tests (moneromooo-monero)
Diffstat (limited to 'src')
| -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> |
