Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,688 Lines • ▼ Show 20 Lines | void CWallet::UnsetWalletFlag(uint64_t flag) { | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
m_wallet_flags &= ~flag; | m_wallet_flags &= ~flag; | ||||
if (!WalletBatch(*database).WriteWalletFlags(m_wallet_flags)) { | if (!WalletBatch(*database).WriteWalletFlags(m_wallet_flags)) { | ||||
throw std::runtime_error(std::string(__func__) + | throw std::runtime_error(std::string(__func__) + | ||||
": writing wallet flags failed"); | ": writing wallet flags failed"); | ||||
} | } | ||||
} | } | ||||
bool CWallet::IsWalletFlagSet(uint64_t flag) { | bool CWallet::IsWalletFlagSet(uint64_t flag) const { | ||||
return (m_wallet_flags & flag); | return (m_wallet_flags & flag); | ||||
} | } | ||||
bool CWallet::SetWalletFlags(uint64_t overwriteFlags, bool memonly) { | bool CWallet::SetWalletFlags(uint64_t overwriteFlags, bool memonly) { | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
m_wallet_flags = overwriteFlags; | m_wallet_flags = overwriteFlags; | ||||
if (((overwriteFlags & KNOWN_WALLET_FLAGS) >> 32) ^ | if (((overwriteFlags & KNOWN_WALLET_FLAGS) >> 32) ^ | ||||
(overwriteFlags >> 32)) { | (overwriteFlags >> 32)) { | ||||
▲ Show 20 Lines • Show All 3,296 Lines • Show Last 20 Lines |