mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
refactor: align header wallet.h with bitcoin's by moving some functiona
Moved: - GetLastBlockHeight - SetLastBlockProcessed
This commit is contained in:
parent
57f92fce86
commit
08f31949e2
@ -1243,21 +1243,6 @@ public:
|
||||
/** Upgrade the wallet */
|
||||
bool UpgradeWallet(int version, bilingual_str& error, std::vector<bilingual_str>& warnings);
|
||||
|
||||
/** Get last block processed height */
|
||||
int GetLastBlockHeight() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
|
||||
{
|
||||
AssertLockHeld(cs_wallet);
|
||||
assert(m_last_block_processed_height >= 0);
|
||||
return m_last_block_processed_height;
|
||||
};
|
||||
/** Set last block processed height, currently only use in unit test */
|
||||
void SetLastBlockProcessed(int block_height, uint256 block_hash) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
|
||||
{
|
||||
AssertLockHeld(cs_wallet);
|
||||
m_last_block_processed_height = block_height;
|
||||
m_last_block_processed = block_hash;
|
||||
};
|
||||
|
||||
//! Get the ScriptPubKeyMan for a script
|
||||
ScriptPubKeyMan* GetScriptPubKeyMan(const CScript& script) const;
|
||||
|
||||
@ -1280,6 +1265,22 @@ public:
|
||||
LegacyScriptPubKeyMan::WatchOnlySet& setWatchOnly GUARDED_BY(cs_KeyStore) = m_spk_man->setWatchOnly;
|
||||
LegacyScriptPubKeyMan::WatchKeyMap& mapWatchKeys GUARDED_BY(cs_KeyStore) = m_spk_man->mapWatchKeys;
|
||||
LegacyScriptPubKeyMan::HDPubKeyMap& mapHdPubKeys GUARDED_BY(cs_KeyStore) = m_spk_man->mapHdPubKeys;
|
||||
|
||||
/** Get last block processed height */
|
||||
int GetLastBlockHeight() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
|
||||
{
|
||||
AssertLockHeld(cs_wallet);
|
||||
assert(m_last_block_processed_height >= 0);
|
||||
return m_last_block_processed_height;
|
||||
};
|
||||
/** Set last block processed height, currently only use in unit test */
|
||||
void SetLastBlockProcessed(int block_height, uint256 block_hash) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
|
||||
{
|
||||
AssertLockHeld(cs_wallet);
|
||||
m_last_block_processed_height = block_height;
|
||||
m_last_block_processed = block_hash;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user