Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 1,446 Lines • ▼ Show 20 Lines | public: | ||||
bool HasEncryptionKeys() const override; | bool HasEncryptionKeys() const override; | ||||
/** Get last block processed height */ | /** Get last block processed height */ | ||||
int GetLastBlockHeight() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | int GetLastBlockHeight() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | ||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
assert(m_last_block_processed_height >= 0); | assert(m_last_block_processed_height >= 0); | ||||
return m_last_block_processed_height; | return m_last_block_processed_height; | ||||
}; | }; | ||||
BlockHash GetLastBlockHash() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | |||||
AssertLockHeld(cs_wallet); | |||||
assert(m_last_block_processed_height >= 0); | |||||
return m_last_block_processed; | |||||
} | |||||
/** Set last block processed height, currently only use in unit test */ | /** Set last block processed height, currently only use in unit test */ | ||||
void SetLastBlockProcessed(int block_height, BlockHash block_hash) | void SetLastBlockProcessed(int block_height, BlockHash block_hash) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | ||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
m_last_block_processed_height = block_height; | m_last_block_processed_height = block_height; | ||||
m_last_block_processed = block_hash; | m_last_block_processed = block_hash; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |