Skip to content

Commit df3a818

Browse files
committed
wallet: make getters const
1 parent 227b9dd commit df3a818

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3201,7 +3201,7 @@ void CWallet::MarkDestinationsDirty(const std::set<CTxDestination>& destinations
32013201
}
32023202
}
32033203

3204-
std::map<CTxDestination, CAmount> CWallet::GetAddressBalances(interfaces::Chain::Lock& locked_chain)
3204+
std::map<CTxDestination, CAmount> CWallet::GetAddressBalances(interfaces::Chain::Lock& locked_chain) const
32053205
{
32063206
std::map<CTxDestination, CAmount> balances;
32073207

@@ -3242,7 +3242,7 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances(interfaces::Chain:
32423242
return balances;
32433243
}
32443244

3245-
std::set< std::set<CTxDestination> > CWallet::GetAddressGroupings()
3245+
std::set< std::set<CTxDestination> > CWallet::GetAddressGroupings() const
32463246
{
32473247
AssertLockHeld(cs_wallet);
32483248
std::set< std::set<CTxDestination> > groupings;

src/wallet/wallet.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,8 @@ class CWallet final : public WalletStorage, private interfaces::Chain::Notificat
832832
* Rescan abort properties
833833
*/
834834
void AbortRescan() { fAbortRescan = true; }
835-
bool IsAbortingRescan() { return fAbortRescan; }
836-
bool IsScanning() { return fScanningWallet; }
835+
bool IsAbortingRescan() const { return fAbortRescan; }
836+
bool IsScanning() const { return fScanningWallet; }
837837
int64_t ScanningDuration() const { return fScanningWallet ? GetTimeMillis() - m_scanning_start : 0; }
838838
double ScanningProgress() const { return fScanningWallet ? (double) m_scanning_progress : 0; }
839839

@@ -973,8 +973,8 @@ class CWallet final : public WalletStorage, private interfaces::Chain::Notificat
973973

974974
int64_t GetOldestKeyPoolTime() const;
975975

976-
std::set<std::set<CTxDestination>> GetAddressGroupings() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
977-
std::map<CTxDestination, CAmount> GetAddressBalances(interfaces::Chain::Lock& locked_chain);
976+
std::set<std::set<CTxDestination>> GetAddressGroupings() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
977+
std::map<CTxDestination, CAmount> GetAddressBalances(interfaces::Chain::Lock& locked_chain) const;
978978

979979
std::set<CTxDestination> GetLabelAddresses(const std::string& label) const;
980980

@@ -1027,7 +1027,7 @@ class CWallet final : public WalletStorage, private interfaces::Chain::Notificat
10271027
bool SetMaxVersion(int nVersion);
10281028

10291029
//! get the current wallet format (the oldest client version guaranteed to understand this wallet)
1030-
int GetVersion() { LOCK(cs_wallet); return nWalletVersion; }
1030+
int GetVersion() const { LOCK(cs_wallet); return nWalletVersion; }
10311031

10321032
//! Get wallet transactions that conflict with given transaction (spend same outputs)
10331033
std::set<uint256> GetConflicts(const uint256& txid) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);

0 commit comments

Comments
 (0)