#include <wallet2.h>
Definition at line 176 of file wallet2.h.
◆ hashchain()
| tools::hashchain::hashchain |
( |
| ) |
|
|
inline |
Definition at line 179 of file wallet2.h.
179 : m_genesis(crypto::null_hash), m_offset(0) {}
◆ clear()
| void tools::hashchain::clear |
( |
void |
| ) |
|
|
inline |
Definition at line 189 of file wallet2.h.
189 { m_offset = 0; m_blockchain.clear(); }
◆ crop()
| void tools::hashchain::crop |
( |
size_t |
height | ) |
|
|
inline |
◆ empty()
| bool tools::hashchain::empty |
( |
void |
| ) |
const |
|
inline |
Definition at line 190 of file wallet2.h.
190 {
return m_blockchain.empty() && m_offset == 0; }
◆ genesis()
Definition at line 183 of file wallet2.h.
183 {
return m_genesis; }
◆ is_in_bounds()
| bool tools::hashchain::is_in_bounds |
( |
size_t |
idx | ) |
const |
|
inline |
Definition at line 185 of file wallet2.h.
185 {
return idx >= m_offset && idx <
size(); }
◆ offset()
| size_t tools::hashchain::offset |
( |
| ) |
const |
|
inline |
◆ operator[]() [1/2]
| const crypto::hash& tools::hashchain::operator[] |
( |
size_t |
idx | ) |
const |
|
inline |
Definition at line 186 of file wallet2.h.
186 {
return m_blockchain[idx - m_offset]; }
◆ operator[]() [2/2]
Definition at line 187 of file wallet2.h.
187 {
return m_blockchain[idx - m_offset]; }
◆ push_back()
| void tools::hashchain::push_back |
( |
const crypto::hash & |
hash | ) |
|
|
inline |
Definition at line 184 of file wallet2.h.
184 {
if (m_offset == 0 && m_blockchain.empty()) m_genesis =
hash; m_blockchain.push_back(
hash); }
◆ refill()
Definition at line 192 of file wallet2.h.
192 { m_blockchain.push_back(
hash); --m_offset; }
◆ serialize()
template<class t_archive >
| void tools::hashchain::serialize |
( |
t_archive & |
a, |
|
|
const unsigned int |
ver |
|
) |
| |
|
inline |
Definition at line 195 of file wallet2.h.
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
◆ size()
| size_t tools::hashchain::size |
( |
void |
| ) |
const |
|
inline |
Definition at line 181 of file wallet2.h.
181 {
return m_blockchain.size() + m_offset; }
◆ trim()
| void tools::hashchain::trim |
( |
size_t |
height | ) |
|
|
inline |
Definition at line 191 of file wallet2.h.
191 {
while (
height > m_offset && m_blockchain.size() > 1) { m_blockchain.pop_front(); ++m_offset; } m_blockchain.shrink_to_fit(); }
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/src/wallet/wallet2.h