diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index bb227b975..94bcd4ba6 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3201,7 +3201,7 @@ void CWallet::MarkDestinationsDirty(const std::set& destinations } } -std::map CWallet::GetAddressBalances(interfaces::Chain::Lock& locked_chain) +std::map CWallet::GetAddressBalances(interfaces::Chain::Lock& locked_chain) const { std::map balances; @@ -3242,7 +3242,7 @@ std::map CWallet::GetAddressBalances(interfaces::Chain: return balances; } -std::set< std::set > CWallet::GetAddressGroupings() +std::set< std::set > CWallet::GetAddressGroupings() const { AssertLockHeld(cs_wallet); std::set< std::set > groupings; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 40c72a864..158482dc4 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -832,8 +832,8 @@ public: * Rescan abort properties */ void AbortRescan() { fAbortRescan = true; } - bool IsAbortingRescan() { return fAbortRescan; } - bool IsScanning() { return fScanningWallet; } + bool IsAbortingRescan() const { return fAbortRescan; } + bool IsScanning() const { return fScanningWallet; } int64_t ScanningDuration() const { return fScanningWallet ? GetTimeMillis() - m_scanning_start : 0; } double ScanningProgress() const { return fScanningWallet ? (double) m_scanning_progress : 0; } @@ -973,8 +973,8 @@ public: int64_t GetOldestKeyPoolTime() const; - std::set> GetAddressGroupings() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); - std::map GetAddressBalances(interfaces::Chain::Lock& locked_chain); + std::set> GetAddressGroupings() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); + std::map GetAddressBalances(interfaces::Chain::Lock& locked_chain) const; std::set GetLabelAddresses(const std::string& label) const; @@ -1027,7 +1027,7 @@ public: bool SetMaxVersion(int nVersion); //! get the current wallet format (the oldest client version guaranteed to understand this wallet) - int GetVersion() { LOCK(cs_wallet); return nWalletVersion; } + int GetVersion() const { LOCK(cs_wallet); return nWalletVersion; } //! Get wallet transactions that conflict with given transaction (spend same outputs) std::set GetConflicts(const uint256& txid) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);